-
Notifications
You must be signed in to change notification settings - Fork 34
55 lines (50 loc) · 1.46 KB
/
publish.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
name: Publish image to GCR
on:
workflow_dispatch:
inputs:
image:
description: 'Image to publish'
required: true
type: choice
options:
- terra-jupyter-aou
- terra-jupyter-base
- terra-jupyter-bioconductor
- terra-jupyter-gatk
- terra-jupyter-hail
- terra-jupyter-python
- terra-jupyter-r
- terra-rstudio-aou
- wondershaper
default: terra-rstudio-rstudio
branch:
description: 'Branch to run the workflow on'
required: false
default: 'master'
jobs:
publish-job:
runs-on: self-hosted
steps:
- name: Checkout current code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.TD_GCP_SA_KEY }}
create_credentials_file: true
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.3.0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Explicitly auth Docker for GCR
run: gcloud auth configure-docker --quiet
- name: Build Docker image and publish
run: |
gcloud auth configure-docker
./build.sh ${{ github.event.inputs.image }} "true"