forked from cortexproject/cortex
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 1.98 KB
/
build-image.yml
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
name: Build Image
on:
push:
branches: [ master ]
paths:
- 'build-image/**'
- '.github/workflows/build-image.yml'
pull_request:
branches: [ master ]
paths:
- 'build-image/**'
- '.github/workflows/build-image.yml'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
name: Checkout
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Save image
run: make save-multiarch-build-image
- name: Upload Docker Images Artifacts
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: build-image
path: |
./build-image-amd64.tar
./build-image-arm64.tar
if-no-files-found: error
push:
needs: build
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
name: Checkout
with:
fetch-depth: 0
- name: Download Docker Images Artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-image
- name: Load image
run: make load-multiarch-build-image
- name: Login to Quay.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: quay.io
username: ${{secrets.QUAY_REGISTRY_USER}}
password: ${{secrets.QUAY_REGISTRY_PASSWORD}}
- name: Push image
run: make push-multiarch-build-image