From 2ab248e6458b395210b1c17418372c8714c5d6e6 Mon Sep 17 00:00:00 2001 From: Oscar Cobles Date: Tue, 16 Jul 2024 15:52:27 +0200 Subject: [PATCH 1/4] chore(ci): gh action to run a daily check for upstream required upgrade Signed-off-by: Oscar Cobles --- .github/workflows/check-upstream-upgrade.yml | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/check-upstream-upgrade.yml diff --git a/.github/workflows/check-upstream-upgrade.yml b/.github/workflows/check-upstream-upgrade.yml new file mode 100644 index 000000000..69bff55c3 --- /dev/null +++ b/.github/workflows/check-upstream-upgrade.yml @@ -0,0 +1,40 @@ +# WARNING: This file was build based on https://github.com/pulumi/ci-mgmt +# but it is currently not in sync. Any update must be done manually + +env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + check_upgrade_provider: + name: Check for upstream provider upgrades + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + submodules: true + - name: Setup tools + uses: ./.github/actions/setup-tools + with: + tools: go + - name: Install upgrade-provider + run: go install github.com/pulumi/upgrade-provider@main + shell: bash + - name: "Set up git identity: name" + run: git config --global user.name equinix-bot + shell: bash + - name: "Set up git identity: email" + run: git config --global user.email bot@equinix.com + shell: bash + - name: Run upgrade-provider upstream check + id: upstream_version + run: | + upgrade-provider "$REPO" --kind=check-upstream-version + env: + REPO: ${{ github.repository }} + shell: bash +name: Check upstream upgrade +on: + workflow_dispatch: {} #so we can run this manually if necessary. + schedule: + # 3 AM UTC ~ 8 PM PDT / 7 PM PST daily. Time chosen to run during off hours. + - cron: 0 3 * * * \ No newline at end of file From 06ffd38faf3c910518656e53bbb4265e221fe2cb Mon Sep 17 00:00:00 2001 From: Oscar Cobles Date: Tue, 16 Jul 2024 16:02:37 +0200 Subject: [PATCH 2/4] fixup! Merge pull request #96 from equinix/generate-example-and-docs Signed-off-by: Oscar Cobles --- .github/workflows/check-upstream-upgrade.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-upstream-upgrade.yml b/.github/workflows/check-upstream-upgrade.yml index 69bff55c3..cfc9a150a 100644 --- a/.github/workflows/check-upstream-upgrade.yml +++ b/.github/workflows/check-upstream-upgrade.yml @@ -37,4 +37,4 @@ on: workflow_dispatch: {} #so we can run this manually if necessary. schedule: # 3 AM UTC ~ 8 PM PDT / 7 PM PST daily. Time chosen to run during off hours. - - cron: 0 3 * * * \ No newline at end of file + - cron: 0 3 * * * From d24ff302b1692a22356b21ef07bd79417247121a Mon Sep 17 00:00:00 2001 From: Oscar Cobles Date: Tue, 16 Jul 2024 16:09:38 +0200 Subject: [PATCH 3/4] fixup! Merge pull request #96 from equinix/generate-example-and-docs Signed-off-by: Oscar Cobles --- .github/workflows/check-upstream-upgrade.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-upstream-upgrade.yml b/.github/workflows/check-upstream-upgrade.yml index cfc9a150a..9ce0a2cd8 100644 --- a/.github/workflows/check-upstream-upgrade.yml +++ b/.github/workflows/check-upstream-upgrade.yml @@ -20,10 +20,10 @@ jobs: run: go install github.com/pulumi/upgrade-provider@main shell: bash - name: "Set up git identity: name" - run: git config --global user.name equinix-bot + run: git config --global user.name GitHub shell: bash - name: "Set up git identity: email" - run: git config --global user.email bot@equinix.com + run: git config --global user.email noreply@github.com shell: bash - name: Run upgrade-provider upstream check id: upstream_version From 47f7d5366b9a53d353beb8e66e137ce366fd763b Mon Sep 17 00:00:00 2001 From: Oscar Cobles Date: Tue, 16 Jul 2024 17:14:16 +0200 Subject: [PATCH 4/4] update cron to run every 8 hours Monday through Friday Signed-off-by: Oscar Cobles --- .github/workflows/check-upstream-upgrade.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-upstream-upgrade.yml b/.github/workflows/check-upstream-upgrade.yml index 9ce0a2cd8..607f47da6 100644 --- a/.github/workflows/check-upstream-upgrade.yml +++ b/.github/workflows/check-upstream-upgrade.yml @@ -36,5 +36,5 @@ name: Check upstream upgrade on: workflow_dispatch: {} #so we can run this manually if necessary. schedule: - # 3 AM UTC ~ 8 PM PDT / 7 PM PST daily. Time chosen to run during off hours. - - cron: 0 3 * * * + # Run every 8 hours Monday through Friday + - cron: '0 */8 * * 1-5'