Skip to content

Commit

Permalink
chore(release): prepare release branch (#35)
Browse files Browse the repository at this point in the history
* chore(release): add mergify config

* ci(tags): include git branch and tag information in image tags
  • Loading branch information
andrewazores authored Jun 6, 2024
1 parent 7b12711 commit e04d4e7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,28 @@ jobs:
sudo apt-get install -y qemu-user-static
- name: Get date tag
run: echo "DATE_TAG=$(date -uI)" >> "$GITHUB_ENV"
- 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 | sed -e "s/^v//" || echo -n '')
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.CI_IMG }}
archs: amd64, arm64
tags: ${{ github.ref_name }} ${{ github.ref == 'refs/heads/main' && 'latest' || '' }} ${{ env.DATE_TAG }}
tags: ${{ github.ref_name }} ${{ github.ref == 'refs/heads/main' && 'latest' || '' }} ${{ env.DATE_TAG }} ${{ steps.check-branch.outputs.image-tag }} ${{ 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
19 changes: 19 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pull_request_rules:
- name: backport patches to cryostat-v3.0 branch
conditions:
- base=main
- label=backport
actions:
backport:
branches:
- cryostat-v3.0
assignees:
- "{{ author }}"

- name: auto label PRs from reviewers
conditions:
- author=@reviewers
actions:
label:
add:
- safe-to-test

0 comments on commit e04d4e7

Please sign in to comment.