Skip to content

Commit

Permalink
cicd: take snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Naramsim committed Jan 9, 2024
1 parent 19af46b commit a716a0c
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/update-gql-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@ jobs:
with:
project_id: 'pokeapi-215911'
workload_identity_provider: 'projects/569595515170/locations/global/workloadIdentityPools/github/providers/deploy'
- uses: 'google-github-actions/ssh-compute@v1'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
instance_name: 'graphql5'
zone: 'us-east1-b'
ssh_private_key: '${{ secrets.GCP_SSH_PRIVATE_KEY }}'
user: ga
command: sudo -i sh -c 'cd pokeapi && make update-graphql-data-prod'
version: '>= 363.0.0'
- name: 'Make snapshot'
run: |
gcloud compute snapshots create gql-1 \
--labels=trigger=gql-data-update \
--snapshot-type=ARCHIVE \
--source-disk=graphql5 \
--source-disk-zone=us-east1-b \
--storage-location=us-east1'
# - 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: sudo -i sh -c 'cd pokeapi && make update-graphql-data-prod'

0 comments on commit a716a0c

Please sign in to comment.