generated from openshift/console-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 4
73 lines (63 loc) · 1.76 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and Push Multi-Arch Image
on:
push:
branches:
- main
release:
types:
- published
workflow_dispatch:
env:
REGISTRY_USER: ${{ secrets.QUAY_USER }}
REGISTRY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
IMAGE_NAME: quay.io/kuadrant/console-plugin
jobs:
build-multiarch:
name: Build Multi-Arch Image with Buildah
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
install_latest: [true, false]
steps:
- name: Set up QEMU for multi-arch
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Install latest Buildah
if: matrix.install_latest
run: |
sudo apt-get update
sudo apt-get install -y buildah
- name: Check out code
uses: actions/checkout@v4
- name: Log in to Quay.io
uses: redhat-actions/podman-login@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build Multi-Arch Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: |
latest
${{ github.sha }}
arch: ${{ matrix.arch }}
containerfiles: |
./Dockerfile
- name: Push Multi-Arch Manifest
if: matrix.arch == 'arm64'
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: |
latest
${{ github.sha }}
- name: Print Image Info
run: |
echo "Image pushed to Quay.io: ${{ env.IMAGE_NAME }}"
echo "Tags: latest, ${{ github.sha }}"