Check #803
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
# Configure Workload Identity Federation via a credentials file. | |
- id: auth | |
name: 🔐 Authenticate to Google Cloud | |
uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: 'projects/586925744942/locations/global/workloadIdentityPools/github-com/providers/github-com-oidc' | |
service_account: 'gh-cost-calculator@billing-api-340811.iam.gserviceaccount.com' | |
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@v2' | |
# 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 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 |