# Optional: build and publish the image whenever you push a tag. # # Requires a Forgejo Actions runner registered to this repository or instance. # If you have no runner, ignore this file and build from your laptop or the # VPS instead — see Part 10 of the README. # # Tag a release with: git tag v1.0 && git push origin v1.0 name: build image on: push: tags: ["v*"] workflow_dispatch: jobs: publish: runs-on: docker steps: - uses: actions/checkout@v4 - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - name: Log in to the Forgejo registry uses: docker/login-action@v3 with: registry: git.plascloud.pt username: ${{ github.actor }} # Forgejo provides this automatically; no secret to configure. password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v5 with: context: . # Add linux/arm64 only if you also run it on ARM. Building the # native SQLite module under emulation is slow. platforms: linux/amd64 push: true tags: | git.plascloud.pt/luisl/lxc-keyreg:${{ github.ref_name }} git.plascloud.pt/luisl/lxc-keyreg:latest