-
Notifications
You must be signed in to change notification settings - Fork 375
159 lines (153 loc) · 7.08 KB
/
containers.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
name: Build containers
on:
push:
paths:
- 'dockerfiles/**'
branches:
- master
pull_request:
paths:
- 'dockerfiles/**'
workflow_dispatch:
jobs:
changed-files:
runs-on: ubuntu-latest
outputs:
# Propagate more outputs if you need https://github.com/tj-actions/changed-files#outputs
# Adding a initial comma so ',<path>' matches also for the first file
all_modified_files: ',${{ steps.changed-files.outputs.all_modified_files }}'
steps:
- uses: actions/checkout@v4
- name: Detect files changed in PR (or commit), and expose as output
id: changed-files
uses: tj-actions/changed-files@v40
with:
# Using comma as separator to be able to easily match full paths (using ,<path>)
separator: ','
# Celotool images
celotool-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/celotool:${{ github.sha }}
needs: changed-files
if: |
github.ref != 'refs/heads/master' &&
contains(needs.changed-files.outputs.all_modified_files, ',dockerfiles/celotool/Dockerfile')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/celotool
tags: ${{ github.sha }}
platforms: linux/amd64
context: .
file: dockerfiles/celotool/Dockerfile
trivy: true
celotool-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
name: Build us-west1-docker.pkg.dev/devopsre/celo-monorepo/celotool:${{ github.sha }}
needs: changed-files
if: |
github.ref == 'refs/heads/master' &&
contains(needs.changed-files.outputs.all_modified_files, ',dockerfiles/celotool/Dockerfile')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo-master/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/celo-monorepo/celotool
tags: ${{ github.sha }}
platforms: linux/amd64
context: .
file: dockerfiles/celotool/Dockerfile
trivy: true
# All monorepo
celomonorepo-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/monorepo:${{ github.sha }}
needs: changed-files
if: |
github.ref != 'refs/heads/master' &&
contains(needs.changed-files.outputs.all_modified_files, ',dockerfiles/all-monorepo/Dockerfile')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/monorepo
tags: ${{ github.sha }}
context: .
file: dockerfiles/all-monorepo/Dockerfile
trivy: true
celomonorepo-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
name: Build us-west1-docker.pkg.dev/devopsre/celo-monorepo/monorepo:${{ github.sha }}
needs: changed-files
if: |
github.ref == 'refs/heads/master' &&
contains(needs.changed-files.outputs.all_modified_files, ',dockerfiles/all-monorepo/Dockerfile')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo-master/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/celo-monorepo/monorepo
tags: ${{ github.sha }}
context: .
file: dockerfiles/all-monorepo/Dockerfile
trivy: true
# CeloCli images
celocli-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
needs: changed-files
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/celocli:testing
if: |
github.ref != 'refs/heads/master' &&
contains(needs.changed-files.outputs.all_modified_files, ',dockerfiles/cli-standalone/Dockerfile')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/celocli
tags: testing
context: .
file: dockerfiles/cli-standalone/Dockerfile
trivy: true
celocli-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
needs: changed-files
name: Build us-west1-docker.pkg.dev/devopsre/celo-monorepo/celocli:latest
if: |
github.ref == 'refs/heads/master' &&
contains(needs.changed-files.outputs.all_modified_files, ',dockerfiles/cli-standalone/Dockerfile')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo-master/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/celo-monorepo/celocli
tags: latest
context: .
file: dockerfiles/cli-standalone/Dockerfile
trivy: true
# Blockscout Metadata crawler images
metadata-crawler-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
needs: changed-files
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/blockscout-metadata-crawler:testing
if: |
github.ref != 'refs/heads/master' &&
contains(needs.changed-files.outputs.all_modified_files, ',dockerfiles/metadata-crawler')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/blockscout-metadata-crawler
tags: testing
context: .
file: dockerfiles/metadata-crawler/Dockerfile
trivy: true
metadata-crawler-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
needs: changed-files
name: Build us-west1-docker.pkg.dev/devopsre/celo-monorepo/blockscout-metadata-crawler:latest
if: |
github.ref == 'refs/heads/master' &&
contains(needs.changed-files.outputs.all_modified_files, ',dockerfiles/metadata-crawler')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/celo-monorepo/blockscout-metadata-crawler
tags: latest
context: .
file: dockerfiles/metadata-crawler/Dockerfile
trivy: true