-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.13 KB
/
deploy.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
name: 'Deploy'
run-name: 'Deploy ${{ inputs.tag }} to ${{ inputs.environment }}'
on:
workflow_call:
inputs:
environment:
description: 'Environment'
type: string
required: true
tag:
description: 'Docker image tag'
type: string
required: true
secrets:
GCP_CREDENTIALS_DEPLOY:
required: true
workflow_dispatch:
inputs:
environment:
description: 'Environment'
type: environment
required: true
tag:
description: 'Docker image tag'
type: string
required: true
default: 'latest'
jobs:
deploy:
runs-on: ubuntu-22.04
environment: ${{ inputs.environment }}
steps:
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_DEPLOY }}'
- name: Deploy image
uses: google-github-actions/deploy-cloudrun@v2
with:
service: schemes
image: europe-west1-docker.pkg.dev/dft-schemes-common/docker/schemes:${{ inputs.tag }}
region: europe-west1