Fix the GH workflow to push the docker image #220
This file contains 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
name: Docker Image CI | |
on: | |
push: | |
tags: | |
- 'v*' # This will match any tag that starts with 'v' | |
pull_request: # Add this to run on PRs | |
branches: | |
- main # Assuming your default branch is 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
tags: ghcr.io/hasura/ndc-calcite:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name }} | |
platforms: linux/amd64,linux/arm64 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |