-
-
Notifications
You must be signed in to change notification settings - Fork 25
52 lines (45 loc) · 1.65 KB
/
check-changes.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
43
44
45
46
47
48
49
50
51
52
name: "Check"
on:
workflow_dispatch:
schedule:
- cron: '12 2 * * *' # Daily at 02:12
jobs:
check-changes:
name: Google Compute Engine API changes
runs-on: ubuntu-latest
# Add "id-token" for Google Authentication
permissions:
issues: write
contents: write
id-token: write
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3
# Configure Workload Identity Federation via a credentials file.
- id: auth
name: 🔐 Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: 'projects/586925744942/locations/global/workloadIdentityPools/github-com/providers/github-com-oidc'
service_account: '[email protected]'
export_environment_variables: true
# Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`.
- name: '🔧 Set up Google Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
# Now you can run gcloud commands authenticated as the impersonated service account.
- id: 'gcloud'
name: 📥 Google Compute Engine API
run: |
cd tools || exit 9
bash regions.sh && \
bash zones.sh && \
bash disktypes.sh && \
bash images.sh && \
bash acceleratortypes.sh && \
bash machinetypes.sh || exit 9
- name: 🌡️ Check changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd tools || exit 9
bash check.sh || exit 9