File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : update-gql-data
2+ on :
3+ push :
4+ branches :
5+ - master
6+ jobs :
7+ update-gql-data :
8+ runs-on : ubuntu-22.04
9+ permissions :
10+ contents : ' read'
11+ id-token : ' write'
12+ steps :
13+ - uses : ' actions/checkout@v4'
14+ - uses : ' google-github-actions/auth@v2'
15+ with :
16+ project_id : ' pokeapi-215911'
17+ workload_identity_provider : ' projects/569595515170/locations/global/workloadIdentityPools/github/providers/api-data'
18+ - name : ' Set up Cloud SDK'
19+ uses : ' google-github-actions/setup-gcloud@v2'
20+ with :
21+ version : ' >= 390.0.0'
22+ - name : ' Make snapshot'
23+ run : |
24+ gcloud compute snapshots create gql-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT} \
25+ --labels=trigger=gql-data-update,next-head-ref=${GITHUB_HEAD_REF} \
26+ --snapshot-type=ARCHIVE \
27+ --source-disk=graphql5 \
28+ --source-disk-zone=us-east1-b \
29+ --storage-location=us-east1
30+ - uses : ' google-github-actions/ssh-compute@v1'
31+ with :
32+ instance_name : ' graphql5'
33+ zone : ' us-east1-b'
34+ ssh_private_key : ' ${{ secrets.GCP_SSH_PRIVATE_KEY }}'
35+ user : ga
36+ command : sudo -i sh -c 'cd pokeapi && make update-graphql-data-prod'
Original file line number Diff line number Diff line change 11.venv /
2+ gha-creds- * .json
You can’t perform that action at this time.
0 commit comments