name: Build & publish Docker images on: push: branches: [main] release: types: [published] env: REGISTRY: git.hexadual.io jobs: server: name: Server image runs-on: ubuntu-latest permissions: contents: read packages: write steps: - uses: actions/checkout@v4 - name: Log in to Gitea container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/rocobo/gcp-dot-server tags: | type=raw,value=latest,enable={{is_default_branch}} type=semver,pattern={{version}} type=sha,prefix=sha-,format=short - name: Build and push server image uses: docker/build-push-action@v5 with: context: ./server push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} egg: name: Egg image runs-on: ubuntu-latest permissions: contents: read packages: write steps: - uses: actions/checkout@v4 - name: Log in to Gitea container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/rocobo/gcp-dot-egg tags: | type=raw,value=latest,enable={{is_default_branch}} type=semver,pattern={{version}} type=sha,prefix=sha-,format=short - name: Build and push egg image uses: docker/build-push-action@v5 with: context: ./egg push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}