-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.3 KB
/
update-gql-data.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
name: update-gql-data
on:
push:
branches:
- gql
jobs:
update-gql-data:
runs-on: ubuntu-22.04
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: 'actions/checkout@v4'
- uses: 'google-github-actions/auth@v2'
with:
project_id: 'pokeapi-215911'
workload_identity_provider: 'projects/569595515170/locations/global/workloadIdentityPools/github/providers/deploy'
- uses: 'google-github-actions/ssh-compute@v1'
with:
instance_name: 'graphql5'
zone: 'us-east1-b'
ssh_private_key: '${{ secrets.GCP_SSH_PRIVATE_KEY }}'
user: ga
command: echo $(sudo -i sh -c 'pwd')
# - name: 'Set up Cloud SDK'
# uses: 'google-github-actions/setup-gcloud@v2'
# with:
# version: '>= 363.0.0'
# - name: write secret
# env:
# GCP_SSH_PRIVATE_KEY: ${{secrets.GCP_SSH_PRIVATE_KEY}}
# shell: bash
# run: |
# echo "$GCP_SSH_PRIVATE_KEY" >> pk
# - name: write public key
# env:
# GCP_SSH_PUBLIC_KEY: ${{secrets.GCP_SSH_PUBLIC_KEY}}
# shell: bash
# run: |
# echo "$GCP_SSH_PUBLIC_KEY" >> pk.pub
# - name: 'Use gcloud CLI'
# run: 'gcloud compute ssh ga@graphql5 --zone us-east1-b --ssh-key-file pk --quiet --command "pwd"'