Skip to content

Commit 5ae2e7d

Browse files
authored
feat: use ssh
1 parent 3e9dfe9 commit 5ae2e7d

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

.github/workflows/update-gql-v1beta-data.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: update-gql-v1beta-data
22
on:
33
workflow_dispatch:
4-
push:
5-
branches:
6-
- master
4+
# push:
5+
# branches:
6+
# - master
77
jobs:
88
update-gql-v1beta-data:
99
runs-on: ubuntu-22.04

.github/workflows/update-gql-v1beta2-data.yml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,8 @@ jobs:
1515
id-token: 'write'
1616
steps:
1717
- uses: 'actions/checkout@v4'
18-
- uses: 'google-github-actions/auth@v2'
19-
with:
20-
project_id: 'pokeapi-test-b6137'
21-
workload_identity_provider: 'projects/854118331945/locations/global/workloadIdentityPools/github-action-pool/providers/github'
22-
- name: 'Set up Cloud SDK'
23-
uses: 'google-github-actions/setup-gcloud@v2'
24-
with:
25-
version: '>= 390.0.0'
18+
2619
- name: 'Update data'
27-
uses: 'google-github-actions/ssh-compute@v1'
28-
with:
29-
instance_name: 'graphql1'
30-
zone: 'us-east1-b'
31-
ssh_private_key: '${{ secrets.GCP_STAGING_GRAPHQL1_VM_SSH_PRIVATE_KEY }}'
32-
user: ga2
33-
command: sudo -i sh -c 'cd pokeapi && make update-graphql-data-prod'
34-
- name: 'Display update output'
3520
run: |-
36-
echo '${{ steps.compute-ssh.outputs.stdout }}'
37-
echo '${{ steps.compute-ssh.outputs.stderr }}'
21+
echo "$GCP_STAGING_GRAPHQL1_VM_SSH_PRIVATE_KEY" > pk.key
22+
ssh -i pk.key [email protected] "sudo -i sh -c 'cd pokeapi && make update-graphql-data-prod'"

0 commit comments

Comments
 (0)