build(deps): bump ubi8/openjdk-17-runtime in /src/container (#1943) #818
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: CI build and push | |
concurrency: | |
group: pr-${{ github.event.number }} | |
cancel-in-progress: false | |
on: | |
push: | |
branches: | |
- main | |
- v[0-9]+ | |
- v[0-9]+.[0-9]+ | |
- cryostat-v[0-9]+.[0-9]+ | |
tags: | |
jobs: | |
code-analysis: | |
uses: ./.github/workflows/ci-code-analysis.yml | |
if: github.repository_owner == 'cryostatio' | |
with: | |
checkout-repo: ${{ github.event.pull_request.head.repo.full_name }} | |
checkout-ref: ${{ github.event.pull_request.head.ref }} | |
build-and-test-amd64: | |
uses: ./.github/workflows/ci-build-image.yml | |
permissions: | |
pull-requests: write | |
if: github.repository_owner == 'cryostatio' | |
with: | |
build-arch: amd64 | |
build-and-test-arm64: | |
uses: ./.github/workflows/ci-build-image.yml | |
permissions: | |
pull-requests: write | |
if: github.repository_owner == 'cryostatio' | |
with: | |
build-arch: arm64 | |
push-to-quay: | |
runs-on: ubuntu-latest | |
needs: [code-analysis, build-and-test-amd64, build-and-test-arm64] | |
env: | |
CRYOSTAT_IMG: quay.io/cryostat/cryostat | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: cryostat-amd64 | |
- name: Load cryostat-amd64 image | |
env: | |
IMAGE_VERSION: ${{ needs.build-and-test-amd64.outputs.image-version }} | |
run: | | |
podman load -i cryostat-amd64.tar | |
podman tag $CRYOSTAT_IMG:$IMAGE_VERSION-linux-amd64 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: cryostat-arm64 | |
- name: Load cryostat-arm64 image | |
env: | |
IMAGE_VERSION: ${{ needs.build-and-test-arm64.outputs.image-version }} | |
run: | | |
podman load -i cryostat-arm64.tar | |
podman tag $CRYOSTAT_IMG:$IMAGE_VERSION-linux-arm64 | |
- name: Create OCI Manifest | |
id: create-manifest | |
env: | |
IMAGE_VERSION: ${{ needs.build-and-test-amd64.outputs.image-version }} | |
run: | | |
podman manifest create $CRYOSTAT_IMG:$IMAGE_VERSION containers-storage:$CRYOSTAT_IMG:$IMAGE_VERSION-linux-amd64 containers-storage:$CRYOSTAT_IMG:$IMAGE_VERSION-linux-arm64 | |
echo "tags=$IMAGE_VERSION" >> "$GITHUB_OUTPUT" | |
- name: Push to quay.io | |
id: push-to-quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: cryostat | |
tags: ${{ steps.create-manifest.outputs.tags }} | |
registry: quay.io/cryostat | |
username: cryostat+bot | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print image URL | |
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" |