Initial commit
This commit is contained in:
33
.gitea/workflows/docker_build.yaml
Normal file
33
.gitea/workflows/docker_build.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Build Docker images
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
tags: [ "*" ]
|
||||
|
||||
jobs:
|
||||
acls:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24.3'
|
||||
|
||||
- uses: ko-build/setup-ko@v0.8
|
||||
with:
|
||||
version: v0.18.0
|
||||
env:
|
||||
KO_DOCKER_REPO: git.prettysunflower.moe/prettysunflower
|
||||
|
||||
- env:
|
||||
auth_token: ${{ secrets.HUB_TOKEN }}
|
||||
run: |
|
||||
echo "${auth_token}" | ko login git.prettysunflower.moe --username ${{ vars.HUB_USERNAME }} --password-stdin
|
||||
ko build -B
|
45
.gitea/workflows/static_docker_build.yaml
Normal file
45
.gitea/workflows/static_docker_build.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Build Docker images for static folder
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
tags: [ "*" ]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: static
|
||||
|
||||
jobs:
|
||||
acls:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: git.prettysunflower.moe/prettysunflower/website-static
|
||||
-
|
||||
name: Login to Gitea Container Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.prettysunflower.moe
|
||||
username: ${{ vars.HUB_USERNAME }}
|
||||
password: ${{ secrets.HUB_TOKEN }}
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: "{{defaultContext}}:static"
|
||||
push: ${{ gitea.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
Reference in New Issue
Block a user