diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 5a25b0a3..d26fe8b3 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: "pr-${{ github.event.number }}" + 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..02825fbe 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-push-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 + 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..7d194ed4 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-push-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 + 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..191ba1eb 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-push-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 + 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 }}