Merge Dependabot PRs #264
This file contains hidden or 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
| permissions: write-all # Equivalent to default permissions plus id-token: write | |
| name: Merge Dependabot PRs | |
| on: | |
| workflow_dispatch: {} | |
| schedule: | |
| # 4:00AM every 4 days. | |
| - cron: '0 4 01/4 * *' | |
| env: | |
| ESC_ACTION_OIDC_AUTH: true | |
| ESC_ACTION_OIDC_ORGANIZATION: pulumi | |
| ESC_ACTION_OIDC_REQUESTED_TOKEN_TYPE: urn:pulumi:token-type:access_token:organization | |
| ESC_ACTION_ENVIRONMENT: github-secrets/pulumi-ci-mgmt | |
| ESC_ACTION_EXPORT_ENVIRONMENT_VARIABLES: GITHUB_TOKEN=PULUMI_BOT_TOKEN | |
| jobs: | |
| generate-providers-list: | |
| name: "Generate Providers List" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch secrets from ESC | |
| id: esc-secrets | |
| uses: pulumi/esc-action@32dda43ffe7a2ab21e6bce11c781b44a3e5623cf # v3 | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - id: get-providers | |
| run: echo "providers=$(jq . providers.json --compact-output)" >> "$GITHUB_OUTPUT" | |
| working-directory: provider-ci | |
| outputs: | |
| providers: ${{ steps.get-providers.outputs.providers }} | |
| update_workflows: | |
| name: "Combine and merge Dependabot PRs" | |
| needs: generate-providers-list | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch secrets from ESC | |
| id: esc-secrets | |
| uses: pulumi/esc-action@32dda43ffe7a2ab21e6bce11c781b44a3e5623cf # v3 | |
| - name: Clone ci-mgmt | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - run: gh auth setup-git | |
| - run: git config --global user.email "bot@pulumi.com" | |
| - run: git config --global user.name "pulumi-bot" | |
| - run: ./scripts/merge_dependabot.sh ${{ matrix.provider }} | |
| strategy: | |
| fail-fast: false | |
| # GitHub recommends only issuing 1 API request per second, and never | |
| # concurrently. For more information, see: | |
| # https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits | |
| max-parallel: 1 | |
| matrix: | |
| provider: ${{ fromJson(needs.generate-providers-list.outputs.providers ) }} |