Build and push build-image #6
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 Image | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'build-image/Dockerfile' | |
- '.github/workflows/build-image.yaml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'build-image/Dockerfile' | |
- '.github/workflows/build-image.yaml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- name: Build & save image | |
run: make build-image save-build-image | |
- name: Upload Docker Images Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-image | |
path: ./build-image.tar | |
if-no-files-found: error | |
push: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- name: Download Docker Images Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-image | |
- name: Load image | |
run: make load-build-image | |
- name: Login to Quay.io | |
run: | | |
if [ -n "$QUAY_REGISTRY_PASSWORD" ]; then | |
docker login -u "$QUAY_REGISTRY_USER" -p "$QUAY_REGISTRY_PASSWORD" quay.io; | |
fi | |
- name: Push image | |
run: make publish-build-image |