chore: nudge operator-image build #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/operator-image.yaml | |
| # | |
| # Builds and pushes the hermes-operator image to ghcr.io. | |
| name: operator-image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feat/* | |
| paths: | |
| - 'api/**' | |
| - 'internal/**' | |
| - 'cmd/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - 'Dockerfile' | |
| - '.github/workflows/operator-image.yaml' | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Compute tags | |
| id: tags | |
| run: | | |
| BRANCH=$(echo "${{ github.ref_name }}" | tr '/' '-') | |
| echo "tag=${BRANCH}" >> $GITHUB_OUTPUT | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: linux/amd64 | |
| push: true | |
| tags: | | |
| ghcr.io/aabichou/hermes-operator:${{ steps.tags.outputs.tag }} |