-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (50 loc) · 1.46 KB
/
build-image.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
name: Build image
on:
push:
branches:
- main
- docker
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
# - name: Set up Depot CLI
# uses: depot/setup-action@v1
- id: auth
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1"
with:
create_credentials_file: false
token_format: "access_token"
workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}
- name: Login to us-central1 Google Artifact Registry
uses: docker/login-action@v3
with:
registry: us-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./prover/Dockerfile
push: true
tags: |
us-docker.pkg.dev/aptos-registry/docker/prover-service:latest
us-docker.pkg.dev/aptos-registry/docker/prover-service:${{ github.sha }}
build-args: |
GIT_COMMIT=${{ github.sha }}