From 166efe9d8b97204d0f4e49e47331af0cb72ccfb7 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Tue, 17 Jun 2025 15:41:58 -0400 Subject: [PATCH 1/3] Add container build jobs to all build workflows --- .github/workflows/development.yml | 25 +++++++++++++++++++++++++ .github/workflows/nightly.yml | 24 ++++++++++++++++++++++++ .github/workflows/release-candidate.yml | 25 +++++++++++++++++++++++++ .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 4 files changed, 99 insertions(+) diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 5a25b0a3..9e115602 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -224,3 +224,28 @@ jobs: They will be retained for **up to 30 days**. ` }) + + build-and-push-container: + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Buildah build + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: ${{ github.event.repository.name }} + tags: ${{ github.sha }} + containerfiles: | + ./deploy/Containerfile + - name: Push To ghcr.io + id: push-to-ghcr + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + username: ${{ github.actor }} + password: ${{ github.token }} + registry: ghcr.io/${{ github.repository_owner }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 16ee11f9..10328cad 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -123,3 +123,27 @@ jobs: - name: Log artifact location run: | echo "Artifacts uploaded to: ${{ steps.artifact-upload.outputs.artifact-url }}" + + build-and-publish-container: + needs: [unit-tests, integration-tests, e2e-tests] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Buildah build + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: ${{ github.event.repository.name }} + tags: nightly ${{ github.sha }} + containerfiles: | + ./deploy/Containerfile + - name: Push To ghcr.io + id: push-to-ghcr + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + username: ${{ github.actor }} + password: ${{ github.token }} + registry: ghcr.io/${{ github.repository_owner }} diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index e5a3ceed..525ac08f 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -115,3 +115,28 @@ jobs: username: ${{ secrets.PYPI_PUBLIC_USER }} password: ${{ secrets.PYPI_PUBLIC_AUTH }} whl: $(find dist -name '*.tar.gz') + + build-and-publish-container: + needs: [unit-tests, integration-tests, e2e-tests] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Buildah build + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: ${{ github.event.repository.name }} + # TODO: Tag version + tags: latest ${{ github.sha }} + containerfiles: | + ./deploy/Containerfile + - name: Push To ghcr.io + id: push-to-ghcr + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + username: ${{ github.actor }} + password: ${{ github.token }} + registry: ghcr.io/${{ github.repository_owner }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5499b525..493cd902 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,3 +114,28 @@ jobs: run: pip install tox - name: Run end-to-end tests run: tox -e test-e2e + + build-and-publish-container: + needs: [unit-tests, integration-tests, e2e-tests] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Buildah build + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: ${{ github.event.repository.name }} + # TODO: Tag version + tags: latest stable ${{ github.sha }} + containerfiles: | + ./deploy/Containerfile + - name: Push To ghcr.io + id: push-to-ghcr + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + username: ${{ github.actor }} + password: ${{ github.token }} + registry: ghcr.io/${{ github.repository_owner }} From a402d6c952f292f501fe4611b4b0cd3bae0f29a5 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Fri, 20 Jun 2025 15:45:42 -0400 Subject: [PATCH 2/3] Drop unique tags --- .github/workflows/development.yml | 2 +- .github/workflows/nightly.yml | 2 +- .github/workflows/release-candidate.yml | 2 +- .github/workflows/release.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 9e115602..d26fe8b3 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -237,7 +237,7 @@ jobs: uses: redhat-actions/buildah-build@v2 with: image: ${{ github.event.repository.name }} - tags: ${{ github.sha }} + tags: "pr-${{ github.event.number }}" containerfiles: | ./deploy/Containerfile - name: Push To ghcr.io diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 10328cad..e568bb28 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -135,7 +135,7 @@ jobs: uses: redhat-actions/buildah-build@v2 with: image: ${{ github.event.repository.name }} - tags: nightly ${{ github.sha }} + tags: nightly containerfiles: | ./deploy/Containerfile - name: Push To ghcr.io diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index 525ac08f..b4c8894e 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -128,7 +128,7 @@ jobs: with: image: ${{ github.event.repository.name }} # TODO: Tag version - tags: latest ${{ github.sha }} + tags: latest containerfiles: | ./deploy/Containerfile - name: Push To ghcr.io diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 493cd902..4b9b9364 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -127,7 +127,7 @@ jobs: with: image: ${{ github.event.repository.name }} # TODO: Tag version - tags: latest stable ${{ github.sha }} + tags: latest stable containerfiles: | ./deploy/Containerfile - name: Push To ghcr.io From f0ebe02b64d11f4956862e2163ce9cffcb046db8 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Fri, 27 Jun 2025 16:46:02 -0400 Subject: [PATCH 3/3] Rename all container workflows to `build-and-push` --- .github/workflows/nightly.yml | 2 +- .github/workflows/release-candidate.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e568bb28..02825fbe 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -124,7 +124,7 @@ jobs: run: | echo "Artifacts uploaded to: ${{ steps.artifact-upload.outputs.artifact-url }}" - build-and-publish-container: + build-and-push-container: needs: [unit-tests, integration-tests, e2e-tests] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index b4c8894e..7d194ed4 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -116,7 +116,7 @@ jobs: password: ${{ secrets.PYPI_PUBLIC_AUTH }} whl: $(find dist -name '*.tar.gz') - build-and-publish-container: + build-and-push-container: needs: [unit-tests, integration-tests, e2e-tests] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b9b9364..191ba1eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: - name: Run end-to-end tests run: tox -e test-e2e - build-and-publish-container: + build-and-push-container: needs: [unit-tests, integration-tests, e2e-tests] runs-on: ubuntu-latest steps: