docs(README): add podman.socket for running run.sh/smoketest.sh (#159… #525
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 }} | |
on: | |
push: | |
branches: | |
- main | |
- v[0-9]+ | |
- v[0-9]+.[0-9]+ | |
- cryostat-v[0-9]+.[0-9]+ | |
jobs: | |
build-and-test: | |
uses: ./.github/workflows/ci-jobs.yml | |
secrets: inherit | |
if: github.repository_owner == 'cryostatio' | |
push-to-quay: | |
runs-on: ubuntu-latest | |
needs: [build-and-test] | |
env: | |
CRYOSTAT_IMG: quay.io/cryostat/cryostat | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: cryostat | |
if: github.repository_owner == 'cryostatio' | |
- name: Load cryostat image | |
run: podman load -i cryostat.tar | |
if: github.repository_owner == 'cryostatio' | |
- name: Tag images | |
id: tag-image | |
env: | |
IMAGE_VERSION: ${{ needs.build-and-test.outputs.image-version }} | |
run: | | |
podman tag $CRYOSTAT_IMG $CRYOSTAT_IMG:$IMAGE_VERSION | |
if [ "$GITHUB_REF" == "refs/heads/main" ]; then | |
podman tag \ | |
${{ env.CRYOSTAT_IMG }}:$IMAGE_VERSION \ | |
${{ env.CRYOSTAT_IMG }}:latest | |
echo "::set-output name=tags::$IMAGE_VERSION latest" | |
else | |
echo "::set-output name=tags::$IMAGE_VERSION" | |
fi | |
if: github.repository_owner == 'cryostatio' | |
- name: Push to quay.io | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: cryostat | |
tags: ${{ steps.tag-image.outputs.tags }} | |
registry: quay.io/cryostat | |
username: cryostat+bot | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
if: github.repository_owner == 'cryostatio' | |
- name: Print image URL | |
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" | |
if: github.repository_owner == 'cryostatio' |