Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Commit e9ede3e

Browse files
committed
chore(release): prepare release branch (#4)
* chore(release): add mergify config * ci(quay): add quay CI * use Containerfile
1 parent 30f8012 commit e9ede3e

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI build and push
2+
3+
concurrency:
4+
group: ci-${{ github.run_id }}
5+
cancel-in-progress: true
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- main
12+
- v[0-9]+
13+
- v[0-9]+.[0-9]+
14+
- cryostat-v[0-9]+.[0-9]+
15+
16+
env:
17+
CI_USER: cryostat+bot
18+
CI_REGISTRY: quay.io/cryostat
19+
CI_IMG: quay.io/cryostat/openshift-oauth-proxy
20+
REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
21+
REF: ${{ github.event.pull_request.head.ref }}
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Install qemu
29+
continue-on-error: false
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y qemu-user-static
33+
- name: Get date tag
34+
run: echo "DATE_TAG=$(date -uI)" >> "$GITHUB_ENV"
35+
- name: Check release branch
36+
id: check-branch
37+
run: |
38+
if [[ ${REF_NAME} == cryostat-v* ]]; then
39+
echo "image-tag=${REF_NAME:10}-dev" >> $GITHUB_OUTPUT
40+
else
41+
echo "image-tag=${REF_NAME}" >> $GITHUB_OUTPUT
42+
fi
43+
- name: Check commit git tag
44+
id: check-commit
45+
run: |
46+
output=$(git describe --tags --exact-match 2>/dev/null | sed -e "s/^v//" || echo -n '')
47+
echo "::set-output name=image-tag::$output"
48+
echo "::set-output name=image-tag-patch::${output:0:3}"
49+
echo "::set-output name=image-tag-release::${output:0:1}"
50+
- name: Build container images and manifest
51+
id: buildah-build
52+
uses: redhat-actions/buildah-build@v2
53+
with:
54+
image: ${{ env.CI_IMG }}
55+
archs: amd64, arm64
56+
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 }}
57+
containerfiles: |
58+
./Containerfile
59+
- name: Push to quay.io
60+
id: push-to-quay
61+
uses: redhat-actions/push-to-registry@v2
62+
with:
63+
image: openshift-oauth-proxy
64+
tags: ${{ steps.buildah-build.outputs.tags }}
65+
registry: ${{ env.CI_REGISTRY }}
66+
username: ${{ env.CI_USER }}
67+
password: ${{ secrets.REGISTRY_PASSWORD }}
68+
if: ${{ github.repository_owner == 'cryostatio' }}
69+
- name: Print image URL
70+
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
71+
if: ${{ github.repository_owner == 'cryostatio' }}

.mergify.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
pull_request_rules:
2+
- name: backport patches to cryostat-v3.0 branch
3+
conditions:
4+
- base=main
5+
- label=backport
6+
actions:
7+
backport:
8+
branches:
9+
- cryostat-v3.0
10+
assignees:
11+
- "{{ author }}"
12+
13+
- name: auto label PRs from reviewers
14+
conditions:
15+
- author=@reviewers
16+
actions:
17+
label:
18+
add:
19+
- safe-to-test

0 commit comments

Comments
 (0)