Skip to content

Commit

Permalink
ci(cryostat): update repo and tags for renaming (#409) (#410)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1847bf9)

Co-authored-by: Andrew Azores <aazores@redhat.com>
  • Loading branch information
mergify[bot] and andrewazores authored Jun 24, 2024
1 parent 7dd1b84 commit 8bf8138
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ on:
- v[0-9]+
- v[0-9]+.[0-9]+
- cryostat-v[0-9]+.[0-9]+
- cryostat3-v[0-9]+.[0-9]+

jobs:
check-before-build:
Expand Down Expand Up @@ -84,7 +83,7 @@ jobs:
${{ runner.os }}-
- uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/cryostat3
repository: ${{ github.repository_owner }}/cryostat
ref: main
submodules: true
fetch-depth: 0
Expand Down Expand Up @@ -129,19 +128,19 @@ jobs:
run: systemctl --user enable --now podman.socket
- name: Set DOCKER_HOST environment variable
run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock" >> "$GITHUB_ENV"
- name: Build cryostat3
- name: Build cryostat
run: ./mvnw -B -U -Dio.cryostat.core.version=${{ needs.build-core.outputs.core_version }} clean verify
continue-on-error: ${{ matrix.java != '17' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Debug podman images
run: podman images
- name: Save cryostat3 image
run: podman save -o cryostat3.tar --format oci-archive quay.io/cryostat/cryostat:3.0.0-snapshot
- name: Save cryostat image
run: podman save -o cryostat.tar --format oci-archive quay.io/cryostat/cryostat:latest
- uses: actions/upload-artifact@v3
with:
name: cryostat3
path: ${{ github.workspace }}/cryostat3.tar
name: cryostat
path: ${{ github.workspace }}/cryostat.tar

push-to-ghcr:
runs-on: ubuntu-latest
Expand All @@ -150,31 +149,31 @@ jobs:
matrix:
java: ['17']
outputs:
amd64_image: ${{ steps.cryostat3_amd64_image.outputs.image }}
amd64_image: ${{ steps.cryostat_amd64_image.outputs.image }}

permissions:
packages: write
steps:
- name: Download cryostat3 artifact
- name: Download cryostat artifact
uses: actions/download-artifact@v3
with:
name: cryostat3
- name: Load cryostat3 image
run: podman load -i cryostat3.tar
- name: Tag cryostat3 image
run: podman tag cryostat:3.0.0-snapshot ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-java${{ matrix.java }}
name: cryostat
- name: Load cryostat image
run: podman load -i cryostat.tar
- name: Tag cryostat image
run: podman tag cryostat:latest ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-java${{ matrix.java }}
- name: Push PR test image to ghcr.io
id: push-cryostat3-to-ghcr
id: push-cryostat-to-ghcr
uses: redhat-actions/push-to-registry@v2
with:
image: cryostat-core
tags: pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-java${{ matrix.java }}
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.event.pull_request.user.login }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: store cryostat3 images as output
id: cryostat3_amd64_image
run: echo "image=${{ steps.push-cryostat3-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT"
- name: store cryostat images as output
id: cryostat_amd64_image
run: echo "image=${{ steps.push-cryostat-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT"

comment-image:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 8bf8138

Please sign in to comment.