This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (56 loc) · 1.82 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
name: Build
on:
push:
branches:
- main
tags:
- v*
env:
MAIN_REGISTRY: ghcr.io
MAIN_USERNAME: ${{ github.actor }}
MAIN_PASSWORD: ${{ github.token }}
MAIN_REPOSITORY: ${{ github.repository }}
jobs:
setup:
uses: janus-idp/.github/.github/workflows/setup.yaml@main
with:
default_tag_version: "latest"
build_platforms: "linux/amd64,linux/arm64"
build-and-push-images:
runs-on: ubuntu-latest
needs: ["setup"]
strategy:
matrix:
platform: ${{ fromJson(needs.setup.outputs.dist_matrix) }}
steps:
- name: Checkout repo
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # pin@v3
- name: Build and push images
uses: janus-idp/.github/.github/actions/build-and-push@main
with:
platform: ${{ matrix.platform }}
image_tag: ${{ needs.setup.outputs.image_tag }}
mirror-images-and-create-manifests:
runs-on: ubuntu-latest
needs: ["setup", "build-and-push-images"]
strategy:
matrix:
include:
- registry: ghcr.io
username: ${{ github.actor }}
password: GITHUB_TOKEN
repository: ${{ github.repository }}
- registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: QUAY_TOKEN
repository: janus-idp/webterminal-proxy
steps:
- name: Mirror images and create manifests
uses: janus-idp/.github/.github/actions/mirror-images-and-create-manifests@main
with:
image_platform_tags: ${{ needs.setup.outputs.image_platform_tags }}
image_tag: ${{ needs.setup.outputs.image_tag }}
registry: ${{ matrix.registry }}
username: ${{ matrix.username }}
password: ${{ secrets[matrix.password] }}
repository: ${{ matrix.repository }}