Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/adoption-monthly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
schedule:
- cron: "0 6 18 * *" # 18th of each month, 06:00 UTC
workflow_dispatch:
inputs:
dry_run:
description: Validate Google Cloud access and estimate query cost without refreshing data
type: boolean
default: false

permissions:
contents: write
Expand All @@ -33,7 +38,7 @@ jobs:
node-version: 22
cache: npm

- uses: google-github-actions/auth@v2
- uses: google-github-actions/auth@v3
with:
project_id: ${{ vars.GCP_PROJECT_ID }}
workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
Expand All @@ -46,11 +51,14 @@ jobs:
run: npm run adoption
env:
GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }}
ADOPTION_DRY_RUN: ${{ inputs.dry_run && '1' || '0' }}

- name: Format data file
if: ${{ !inputs.dry_run }}
run: npx prettier --write src/data/adoption.json

- name: Detect change
if: ${{ !inputs.dry_run }}
id: diff
run: |
if git diff --quiet -- src/data/adoption.json; then
Expand All @@ -61,7 +69,7 @@ jobs:
fi

- name: Open or update PR
if: steps.diff.outputs.changed == 'true'
if: ${{ !inputs.dry_run && steps.diff.outputs.changed == 'true' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
Loading
Loading