forked from ethereum-optimism/op-geth
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (58 loc) · 2.46 KB
/
docker-build-scan.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
name: Docker Build Push
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-scan-container-geth:
runs-on: ['self-hosted', 'org', '8-cpu']
permissions:
contents: read
security-events: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Login at GCP Artifact Registry
uses: celo-org/reusable-workflows/.github/actions/auth-gcp-artifact-registry@v2.0.5
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-op-geth/providers/github-by-repos
service-account: op-geth-dev@blockchaintestsglobaltestnet.iam.gserviceaccount.com
docker-gcp-registries: us-west1-docker.pkg.dev
- name: Build and push container
uses: celo-org/reusable-workflows/.github/actions/build-container@v2.0.5
with:
platforms: ${{ startsWith(github.ref, 'refs/heads/celo') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
registry: us-west1-docker.pkg.dev/blockchaintestsglobaltestnet/dev-images/op-geth
tags: ${{ github.sha }}
context: .
dockerfile: Dockerfile
push: true
trivy: ${{ startsWith(github.ref, 'refs/heads/celo') }}
build-scan-container-bootnode:
runs-on: ['self-hosted', 'org', '8-cpu']
permissions:
contents: read
security-events: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Login at GCP Artifact Registry
uses: celo-org/reusable-workflows/.github/actions/auth-gcp-artifact-registry@v2.0.5
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-op-geth/providers/github-by-repos
service-account: op-geth-dev@blockchaintestsglobaltestnet.iam.gserviceaccount.com
docker-gcp-registries: us-west1-docker.pkg.dev
- name: Build and push container
uses: celo-org/reusable-workflows/.github/actions/build-container@v2.0.5
with:
platforms: ${{ startsWith(github.ref, 'refs/heads/celo') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
registry: us-west1-docker.pkg.dev/blockchaintestsglobaltestnet/dev-images/op-geth-bootnode
tags: ${{ github.sha }}
context: .
dockerfile: Dockerfile.bootnode
push: true
trivy: ${{ startsWith(github.ref, 'refs/heads/celo') }}