-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.22 KB
/
deploy-job-main.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
name: Deploy Job
run-name: Deploy ${{ github.event.workflow_run.head_branch }} by @${{ github.actor }}
on:
push:
branches:
- main
permissions:
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: authenticate to google cloud
id: "auth"
uses: google-github-actions/auth@v2
with:
workload_identity_provider: projects/522856288592/locations/global/workloadIdentityPools/clingen-actions-pool/providers/clingen-github-actions
service_account: clinvar-ftp-watcher-deployment@clingen-dev.iam.gserviceaccount.com
- name: setup gcloud sdk
uses: google-github-actions/setup-gcloud@v2
- name: set env vars
run: |
export branch=${{ github.event.workflow_run.head_branch }}
export commit=${{ github.event.workflow_run.head_sha }}
echo "branch=$branch" >> $GITHUB_ENV
echo "commit=$commit" >> $GITHUB_ENV
echo "instance_name=clinvar-ftp-watcher-$branch" >> $GITHUB_ENV
- name: build and deploy
run: |
bash misc/bin/deploy-job.sh