diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml new file mode 100644 index 0000000..93c36e3 --- /dev/null +++ b/.forgejo/workflows/publish.yml @@ -0,0 +1,37 @@ +name: Publish UI image + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+-wilddragon*' + +jobs: + build-push: + runs-on: docker + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: ${{ vars.REGISTRY }} + username: ${{ vars.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ vars.REGISTRY }}/${{ vars.IMAGE_NAME }}:${{ github.ref_name }} + ${{ vars.REGISTRY }}/${{ vars.IMAGE_NAME }}:latest + cache-from: type=gha + cache-to: type=gha,mode=max