forked from software-mansion-labs/GoL2
-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (43 loc) · 1.24 KB
/
cicd.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
name: gol2
on:
push:
branches:
- 'main'
- 'update-starknet'
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.meta.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: europe-west9-docker.pkg.dev/gol2-development/gol2-indexer/dev
flavor: latest=false
tags: |
type=ref,suffix=-{{sha}},event=branch
type=ref,suffix=-{{sha}},event=pr
- uses: 'google-github-actions/auth@v2'
id: auth
with:
token_format: access_token
project_id: 'gol2-development'
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: Login to GAR
uses: docker/login-action@v3
with:
registry: europe-west9-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Build and push
uses: docker/build-push-action@v5
with:
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}