Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): rename release branch image's tag #48

Merged
merged 6 commits into from
Nov 8, 2023
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,36 @@ jobs:
runs-on: ubuntu-latest
env:
CRYOSTAT_GRAFANA_IMG: quay.io/cryostat/cryostat-grafana-dashboard
REF_NAME: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v2
- name: Install qemu
continue-on-error: false
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Check release branch
id: check-branch
run: |
if [[ ${REF_NAME} == cryostat-v* ]]; then
echo "image-tag=${REF_NAME:10}-dev" >> $GITHUB_OUTPUT
else
echo "image-tag=${REF_NAME}" >> $GITHUB_OUTPUT
fi
- name: Check commit git tag
id: check-commit
run: |
output=$(git describe --tags --exact-match 2>/dev/null || echo -n '')
andrewazores marked this conversation as resolved.
Show resolved Hide resolved
echo "::set-output name=image-tag::$output"
echo "::set-output name=image-tag-patch::${output:0:3}"
echo "::set-output name=image-tag-release::${output:0:1}"
- name: Build container images and manifest
id: buildah-build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.CRYOSTAT_GRAFANA_IMG }}
archs: amd64, arm64
tags: ${{ github.ref_name }} ${{ github.ref == 'refs/heads/main' && 'latest' || '' }}
tags: ${{ steps.check-branch.outputs.image-tag }} ${{ github.ref == 'refs/heads/main' && 'latest' || '' }} ${{ steps.check-commit.outputs.image-tag }} ${{ steps.check-commit.outputs.image-tag-patch }} ${{ steps.check-commit.outputs.image-tag-release }}
containerfiles: |
./Dockerfile
- name: Push to quay.io
Expand Down