-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (34 loc) · 1.34 KB
/
test.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: test.yml
run-name: test run
on:
workflow_dispatch:
jobs:
default-job:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-22.04
steps:
- name: Check out `empower-config` to get env-config
uses: actions/checkout@v3
with:
repository: sentry-demos/empower-config
path: empower-config
token: ${{ secrets.KOSTY_PERSONAL_ACCESS_TOKEN_FOR_SYNC_DEPLOY_FORK }}
- name: Get GCP_ env variables from empower-config/.gcloudrc
run: |
source empower-config/.gcloudrc
echo "GCP_WORKLOAD_IDENTITY_PROVIDER=$GCP_WORKLOAD_IDENTITY_PROVIDER" >> $GITHUB_OUTPUT
echo "GCP_SERVICE_ACCOUNT=$GCP_SERVICE_ACCOUNT" >> $GITHUB_OUTPUT
id: gcloudrc
- id: 'auth'
name: 'Authenticate Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
workload_identity_provider: ${{ steps.gcloudrc.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ steps.gcloudrc.outputs.GCP_SERVICE_ACCOUNT }}
- name: 'Set up Google Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v0'
- name: 'Try ssh-ing into GCP host'
run: gcloud compute ssh empower-tda-and-crons --zone us-central1-a -- ls
- run: echo "Job status is ${{ job.status }}."