From 782eadfeb440e73f4e4d9be8efe019f8e4d51be9 Mon Sep 17 00:00:00 2001 From: Ringo De Smet Date: Mon, 7 Oct 2024 17:52:55 +0200 Subject: [PATCH] Use Github token to run upgrade bridge workflow --- .../.github/workflows/upgrade-bridge.yml | 9 ++++++++- .../acme/.github/workflows/upgrade-bridge.yml | 9 ++++++++- .../aws/.github/workflows/upgrade-bridge.yml | 9 ++++++++- .../cloudflare/.github/workflows/upgrade-bridge.yml | 9 ++++++++- .../docker/.github/workflows/upgrade-bridge.yml | 9 ++++++++- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-bridge.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-bridge.yml index 003c05837..4c7b00d5b 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-bridge.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-bridge.yml @@ -1,6 +1,7 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt name: Upgrade bridge + on: repository_dispatch: types: @@ -49,13 +50,19 @@ on: required: false type: boolean default: false + env: - GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: upgrade_provider: name: upgrade-provider runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + permissions: + contents: write + issues: write + pull-requests: write steps: #{{- if .Config.freeDiskSpaceBeforeBuild }}# # Run as first step so we don't delete things that have just been installed diff --git a/provider-ci/test-providers/acme/.github/workflows/upgrade-bridge.yml b/provider-ci/test-providers/acme/.github/workflows/upgrade-bridge.yml index 37b34914d..c6e70f416 100644 --- a/provider-ci/test-providers/acme/.github/workflows/upgrade-bridge.yml +++ b/provider-ci/test-providers/acme/.github/workflows/upgrade-bridge.yml @@ -1,6 +1,7 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt name: Upgrade bridge + on: repository_dispatch: types: @@ -49,13 +50,19 @@ on: required: false type: boolean default: false + env: - GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: upgrade_provider: name: upgrade-provider runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write steps: - name: Checkout Repo uses: actions/checkout@v4 diff --git a/provider-ci/test-providers/aws/.github/workflows/upgrade-bridge.yml b/provider-ci/test-providers/aws/.github/workflows/upgrade-bridge.yml index 8e79b2619..ce7c07f39 100644 --- a/provider-ci/test-providers/aws/.github/workflows/upgrade-bridge.yml +++ b/provider-ci/test-providers/aws/.github/workflows/upgrade-bridge.yml @@ -1,6 +1,7 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt name: Upgrade bridge + on: repository_dispatch: types: @@ -49,13 +50,19 @@ on: required: false type: boolean default: false + env: - GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: upgrade_provider: name: upgrade-provider runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write steps: # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) diff --git a/provider-ci/test-providers/cloudflare/.github/workflows/upgrade-bridge.yml b/provider-ci/test-providers/cloudflare/.github/workflows/upgrade-bridge.yml index 0c47364ca..572d2bf03 100644 --- a/provider-ci/test-providers/cloudflare/.github/workflows/upgrade-bridge.yml +++ b/provider-ci/test-providers/cloudflare/.github/workflows/upgrade-bridge.yml @@ -1,6 +1,7 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt name: Upgrade bridge + on: repository_dispatch: types: @@ -49,13 +50,19 @@ on: required: false type: boolean default: false + env: - GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: upgrade_provider: name: upgrade-provider runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write steps: - name: Checkout Repo uses: actions/checkout@v4 diff --git a/provider-ci/test-providers/docker/.github/workflows/upgrade-bridge.yml b/provider-ci/test-providers/docker/.github/workflows/upgrade-bridge.yml index 0c47364ca..572d2bf03 100644 --- a/provider-ci/test-providers/docker/.github/workflows/upgrade-bridge.yml +++ b/provider-ci/test-providers/docker/.github/workflows/upgrade-bridge.yml @@ -1,6 +1,7 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt name: Upgrade bridge + on: repository_dispatch: types: @@ -49,13 +50,19 @@ on: required: false type: boolean default: false + env: - GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: upgrade_provider: name: upgrade-provider runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write steps: - name: Checkout Repo uses: actions/checkout@v4