forked from blockchain-etl/ethereum-etl
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.6 KB
/
build.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
name: Build & Push Container
on:
push:
branches:
- master
- develop
tags:
- "v*"
jobs:
build-images:
runs-on: ubuntu-latest
outputs:
author-name: ${{ steps.author-name.outputs.author-name }}
author-email: ${{ steps.author-email.outputs.author-email }}
tag: ${{ steps.tag.outputs.tag }}
steps:
- uses: actions/[email protected]
- name: Docker meta
id: meta
uses: docker/[email protected]
with:
images: us-central1-docker.pkg.dev/p2p-data-lambda/images/ethereum-etl
tags: |
type=ref,event=tag
type=sha,event=branch,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
flavor: |
latest=false
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
token_format: 'access_token'
credentials_json: '${{ secrets.GOOGLE_ARTIFACTREGISTRY_CREDENTIALS }}'
- name: Configure GC docker
run: |
gcloud auth configure-docker us-central1-docker.pkg.dev
- name: Build and push
uses: docker/[email protected]
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- id: author-name
run: echo "author-name=$(git log -1 --pretty=format:'%an')" >> $GITHUB_OUTPUT
- id: author-email
run: echo "author-email=$(git log -1 --pretty=format:'%ae')" >> $GITHUB_OUTPUT
- id: tag
run: echo "tag=$DOCKER_METADATA_OUTPUT_VERSION" >> $GITHUB_OUTPUT