Build Container Images (PR) #383
Workflow file for this run
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: Build Container Images (PR) | |
on: | |
workflow_dispatch: # For manually triggering workflow | |
pull_request: | |
branches: [ main ] | |
merge_group: | |
branches: [ main ] | |
jobs: | |
build-and-push-images: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- name: Get Tag | |
id: tagger | |
run: echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT | |
- name: Docker meta for GHCR | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/risingwavelabs/risingwave-operator | |
tags: | | |
type=ref,event=pr | |
type=sha | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and Push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: build/Dockerfile | |
build-args: | | |
VERSION=${{steps.tagger.outputs.tag}} | |
push: false | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |