1.2.0 #6
Workflow file for this run
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
| name: Build Release | |
| on: | |
| release: | |
| types: | |
| - published | |
| push: | |
| branches: [ ghactions ] | |
| env: | |
| IMAGE_NAME: preflight-trigger | |
| jobs: | |
| build-release: | |
| name: Build and push tag images | |
| strategy: | |
| matrix: | |
| architecture: [amd64] | |
| platform: [linux] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set Env Tags | |
| run: echo RELEASE_TAG=$(echo $GITHUB_REF | cut -d '/' -f 3) >> $GITHUB_ENV | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Build Image | |
| id: build-image | |
| uses: redhat-actions/buildah-build@v2 | |
| with: | |
| image: ${{ secrets.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }} | |
| # TODO: If we end up releasing for other architectures we'll need the below | |
| # tags: ${{ env.RELEASE_TAG }}-${{ matrix.platform }}-${{ matrix.architecture }} | |
| tags: ${{ env.RELEASE_TAG }} | |
| archs: ${{ matrix.architecture }} | |
| build-args: | | |
| release_tag=${{env.RELEASE_TAG }} | |
| ARCH=${{ matrix.architecture }} | |
| dockerfiles: | | |
| ./Dockerfile | |
| - name: Push Image | |
| id: push-image | |
| uses: redhat-actions/push-to-registry@v2 | |
| with: | |
| image: ${{ env.IMAGE_NAME }} | |
| # TODO: If we end up releasing for other architectures we'll need the below | |
| # tags: ${{ env.RELEASE_TAG }}-${{ matrix.platform }}-${{ matrix.architecture }} | |
| tags: ${{ env.RELEASE_TAG }} | |
| registry: ${{ secrets.IMAGE_REGISTRY }} | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| - name: Print image url | |
| run: echo "Image pushed to ${{ steps.push-image.outputs.registry-paths }}" | |
| outputs: | |
| imageName: ${{ env.IMAGE_NAME }} | |
| imageVersion: ${{ env.RELEASE_TAG }} |