From 8d43339521e5fc650c2acfd730dfd2d356a0bcf9 Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Mon, 17 Jun 2024 16:11:53 +0200 Subject: [PATCH] Modify weekly pulumi upgrade action to run acceptance tests and auto-merge --- .github/workflows/command-dispatch.yml | 4 +++- .github/workflows/weekly-pulumi-update.yml | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/command-dispatch.yml b/.github/workflows/command-dispatch.yml index e5414bb47..ad4106d31 100644 --- a/.github/workflows/command-dispatch.yml +++ b/.github/workflows/command-dispatch.yml @@ -13,7 +13,9 @@ jobs: with: token: ${{ secrets.PULUMI_BOT_TOKEN }} reaction-token: ${{ secrets.GITHUB_TOKEN }} - commands: run-acceptance-tests + commands: | + run-acceptance-tests + run-pulumi-update permission: write issue-type: pull-request repository: pulumi/pulumi-awsx diff --git a/.github/workflows/weekly-pulumi-update.yml b/.github/workflows/weekly-pulumi-update.yml index 3b09e48c7..cd622d149 100644 --- a/.github/workflows/weekly-pulumi-update.yml +++ b/.github/workflows/weekly-pulumi-update.yml @@ -1,5 +1,7 @@ name: weekly-pulumi-update on: + repository_dispatch: + types: [run-pulumi-update-command] schedule: # Every Monday at 11AM UTC - cron: 0 11 * * 1 @@ -85,8 +87,13 @@ jobs: - name: pull-request if: steps.gomod.outputs.changes != 0 env: - GH_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} run: | gh pr create --title "Update pulumi/pulumi version to $PULUMI_VERSION" --body "Upgrading pulumi/pkg and pulumi/sdk to version $PULUMI_VERSION." - gh pr merge --auto + - name: Enable auto-merge + if: steps.gomod.outputs.changes != 0 && github.event_name == 'schedule' + env: + GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + run: | + gh pr merge --merge --auto "1" name: weekly-pulumi-update