forked from openshift/oauth-proxy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): prepare release branch (#4)
* chore(release): add mergify config * ci(quay): add quay CI * use Containerfile
- Loading branch information
1 parent
95975a2
commit b7dd78f
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: CI build and push | ||
|
||
concurrency: | ||
group: ci-${{ github.run_id }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- v[0-9]+ | ||
- v[0-9]+.[0-9]+ | ||
- cryostat-v[0-9]+.[0-9]+ | ||
|
||
env: | ||
CI_USER: cryostat+bot | ||
CI_REGISTRY: quay.io/cryostat | ||
CI_IMG: quay.io/cryostat/openshift-oauth-proxy | ||
REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }} | ||
REF: ${{ github.event.pull_request.head.ref }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
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: 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 }} ${{ 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: | | ||
./Containerfile | ||
- name: Push to quay.io | ||
id: push-to-quay | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: openshift-oauth-proxy | ||
tags: ${{ steps.buildah-build.outputs.tags }} | ||
registry: ${{ env.CI_REGISTRY }} | ||
username: ${{ env.CI_USER }} | ||
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' }} |
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
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 |