generated from konveyor-ecosystem/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 27
68 lines (62 loc) · 2.11 KB
/
multi-arch-image-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
name: 'Build and Push Multi-Arch Image'
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'release-*'
tags:
- 'v*'
concurrency:
group: march-build-${{ github.ref }}
cancel-in-progress: true
env:
tag: ${{ github.ref == 'refs/heads/main' && 'latest' || github.ref_name }}
jobs:
image-build:
uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main
with:
registry: "quay.io/konveyor"
image_name: "kantra"
containerfile: "./Dockerfile"
architectures: '[ "amd64", "arm64" ]'
extra-args: |
--build-arg RULESETS_REF=${{ github.ref_name }} --build-arg VERSION=${{ github.ref_name == 'main' && 'latest' || github.ref_name }} --build-arg BUILD_COMMIT=${{ github.sha }}
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
windows-image-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- name: Login to Docker Hub
uses: docker/login-action@master
with:
registry: "quay.io/konveyor"
username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
- name: Build static-report
run: |
docker build -f ./Dockerfile.windows -t quay.io/konveyor/kantra:$env:tag-windowsservercore-ltsc2022 .
docker push quay.io/konveyor/kantra:$env:tag-windowsservercore-ltsc2022
update-manifest:
needs:
- image-build
- windows-image-build
runs-on: ubuntu-latest
steps:
- name: update manifest
run: |
podman manifest create temp
podman manifest add temp --all quay.io/konveyor/kantra:${tag}
podman manifest add temp --all quay.io/konveyor/kantra:${tag}-windowsservercore-ltsc2022
podman tag temp quay.io/konveyor/kantra:${tag}
- name: Push manifest to Quay
uses: redhat-actions/push-to-registry@main
id: push
with:
image: konveyor/kantra
tags: ${{ env.tag }}
username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
registry: quay.io