-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (48 loc) · 1.48 KB
/
build-availability-oracle.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
50
51
52
53
54
55
56
57
name: Build Availability Oracle
on:
push:
branches:
- main
env:
BASE_IMAGE: ghcr.io/edgeandnode/availability-oracle
DOCKERFILE: Dockerfile.availability-oracle
APP: availability-oracle
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
with:
images: ${{ env.BASE_IMAGE }}
tags: |
type=sha
type=raw,value=latest
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.cr_pat }}
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
cache-from: type=registry,ref=${{ env.BASE_IMAGE }}:latest
cache-to: type=inline
file: ${{ env.DOCKERFILE }}
tags: ${{ steps.docker_meta.outputs.tags }}
push: true
- name: Get GKE Credentials for the staging cluster
uses: google-github-actions/get-gke-credentials@v0
with:
credentials: ${{ secrets.gcloud_service_account }}
cluster_name: staging-network
location: us-central1-a
project_id: graph-mainnet
- name: Restart staging statefulset
run: kubectl rollout restart sts/${{ env.APP }}