-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(multiarch): build multiarch using GitHub Actions
- Loading branch information
1 parent
8661258
commit 437f3cf
Showing
1 changed file
with
52 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,52 @@ | ||
name: CI build and push | ||
|
||
concurrency: | ||
group: ci-${{ github.run_id }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- v[0-9]+ | ||
- v[0-9]+.[0-9]+ | ||
- cryostat-v[0-9]+.[0-9]+ | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
CRYOSTAT_GRAFANA_IMG: quay.io/cryostat/cryostat-grafana-dashboard | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Install qemu | ||
continue-on-error: false | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y qemu-user-static | ||
- 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' || '' }} | ||
containerfiles: | | ||
./Dockerfile | ||
- name: Push to quay.io | ||
id: push-to-quay | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: cryostat-grafana-dashboard | ||
tags: ${{ steps.buildah-build.outputs.tags }} | ||
registry: quay.io/cryostat | ||
username: cryostat+bot | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
if: ${{ github.event_name == 'push' && github.repository_owner == 'cryostatio' }} | ||
- name: Print image URL | ||
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" | ||
if: ${{ github.event_name == 'push' && github.repository_owner == 'cryostatio' }} | ||
|