Skip to content

Factor shared logic to update-workflows.yml #174

Factor shared logic to update-workflows.yml

Factor shared logic to update-workflows.yml #174

# This is the version of update-workflows-bridged-providers.yml scoped down to Ecosystem team owned providers.
#
# Generates a PR for the files in provider-ci/providers/* to each corresponding Pulumi provider.
#
# Note that this workflow does not generate any files - workflows must already be generated and committed to this repo
# when this workflow is run.
name: Update GH workflows, ecosystem providers
on:
schedule:
# 5 AM UTC ~ 10 PM PDT - specifically selected to avoid putting load on the CI system during working hours.
- cron: 0 5 * * *
workflow_dispatch:
inputs:
automerge:
description: Mark created PRs for auto-merging?
required: true
type: boolean
default: true
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
jobs:
generate-providers-list:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: get-providers
run: echo "::set-output name=providers::$(python generate_providers_list.py --team ecosystem)'"
working-directory: scripts
outputs:
providers: ${{ steps.get-providers.outputs.providers }}
deploy:
needs: generate-providers-list
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 ) }}
uses: ./github/workflows/update-workflows.yml

Check failure on line 42 in .github/workflows/update-workflows-ecosystem-providers.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-workflows-ecosystem-providers.yml

Invalid workflow file

invalid value workflow reference: no version specified
secrets: inherit
with:
bridged: true
provider_name: ${{ matrix.provider }}
automerge: |
github.event.inputs.automerge == 'true' || github.event_name == 'schedule'
caller_workflow: update-workflows-ecosystem-providers