-
Notifications
You must be signed in to change notification settings - Fork 16
36 lines (29 loc) · 1 KB
/
docker-image.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
name: Docker Image
on:
push:
branches:
- develop
pull_request:
jobs:
build-image:
runs-on: ubuntu-latest
name: Build and Push
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GCP Artifact Registry
run: echo "$GOOGLE_CREDENTIALS" | docker login -u _json_key --password-stdin https://us-east1-docker.pkg.dev
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
tags: us-east1-docker.pkg.dev/pagoda-discovery-platform-dev/mpc-recovery/mpc-recovery-dev:${{ github.sha }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Push Docker image
run: docker push us-east1-docker.pkg.dev/pagoda-discovery-platform-dev/mpc-recovery/mpc-recovery-dev:${{ github.sha }}