From 49390785d0908716a914fdd5fb04ed6b439f6526 Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Fri, 1 Mar 2024 03:18:54 -0500 Subject: [PATCH 1/6] ci: Add Expense Contribution workflow --- .github/workflows/expense.yml/expense.yml | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/expense.yml/expense.yml diff --git a/.github/workflows/expense.yml/expense.yml b/.github/workflows/expense.yml/expense.yml new file mode 100644 index 0000000..ec9dbb4 --- /dev/null +++ b/.github/workflows/expense.yml/expense.yml @@ -0,0 +1,64 @@ +name: Expense Contribution + +on: + workflow_dispatch: + inputs: + prNumber: + description: "Number of the PR (without #)" + required: true + amount: + description: "The expense amount you like to grant for the contribution in $" + required: true + type: choice + default: "patch" + options: + - 15 + - 25 + - 35 + - 50 + - 100 + - 150 + - 200 + - 250 + - 300 + - 350 + - 400 + - 450 + - 500 + - 550 + - 600 + - 650 + - 700 + - 750 + - 800 + - 850 + - 900 + - 950 + - 1000 + +jobs: + authorize: + runs-on: ubuntu-latest + steps: + - uses: octokit/request-action@v2.1.9 + with: + route: GET /orgs/:organisation/teams/:team/memberships/${{ github.actor }} + team: technical-steering-committee + organisation: webdriverio + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + expense: + permissions: + contents: write + id-token: write + needs: [authorize] + runs-on: ubuntu-latest + steps: + - name: Run Expense Flow + uses: webdriverio/expense-action@v1 + with: + prNumber: ${{ github.event.inputs.prNumber }} + amount: ${{ github.event.inputs.amount }} + env: + RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} + GH_TOKEN: ${{ secrets.WDIO_BOT_GITHUB_TOKEN }} From 2505a41a8c06f01a77d2410aa0d96b0aaad754ef Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Fri, 1 Mar 2024 15:33:36 -0500 Subject: [PATCH 2/6] Fix filepath --- .github/workflows/{expense.yml/expense.yml => expense.yml-} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{expense.yml/expense.yml => expense.yml-} (100%) diff --git a/.github/workflows/expense.yml/expense.yml b/.github/workflows/expense.yml- similarity index 100% rename from .github/workflows/expense.yml/expense.yml rename to .github/workflows/expense.yml- From 3f3abc7ff3471f1a9691f5fabfdb1d7f181267f8 Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Fri, 1 Mar 2024 15:42:14 -0500 Subject: [PATCH 3/6] Prefer GH_TOKEN_WDIO_BOT over GH_TOKEN --- .github/workflows/expense.yml- | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/expense.yml- b/.github/workflows/expense.yml- index ec9dbb4..b5e13b5 100644 --- a/.github/workflows/expense.yml- +++ b/.github/workflows/expense.yml- @@ -46,7 +46,7 @@ jobs: team: technical-steering-committee organisation: webdriverio env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_WDIO_BOT }} expense: permissions: contents: write diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8bed62a..0e47ee5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: team: technical-steering-committee organisation: webdriverio env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_WDIO_BOT }} release: needs: [authorize] runs-on: ubuntu-latest From 34d0685ffea57578f8faffb7d369c3f1730a5eff Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Fri, 1 Mar 2024 15:52:49 -0500 Subject: [PATCH 4/6] Prefer WDIO_BOT_GITHUB_TOKEN over GH_TOKEN_WDIO_BOT --- .github/workflows/expense.yml- | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/expense.yml- b/.github/workflows/expense.yml- index b5e13b5..c5a5c53 100644 --- a/.github/workflows/expense.yml- +++ b/.github/workflows/expense.yml- @@ -46,7 +46,7 @@ jobs: team: technical-steering-committee organisation: webdriverio env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN_WDIO_BOT }} + GITHUB_TOKEN: ${{ secrets.WDIO_BOT_GITHUB_TOKEN }} expense: permissions: contents: write diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0e47ee5..919aeda 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: team: technical-steering-committee organisation: webdriverio env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN_WDIO_BOT }} + GITHUB_TOKEN: ${{ secrets.WDIO_BOT_GITHUB_TOKEN }} release: needs: [authorize] runs-on: ubuntu-latest From 6fc20ade3988333addb8a50acf3e86882c1e8870 Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Fri, 1 Mar 2024 15:53:54 -0500 Subject: [PATCH 5/6] Fix filepath --- .github/workflows/{expense.yml- => expense.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{expense.yml- => expense.yml} (100%) diff --git a/.github/workflows/expense.yml- b/.github/workflows/expense.yml similarity index 100% rename from .github/workflows/expense.yml- rename to .github/workflows/expense.yml From 9f58fdee50e429bd8af0a689ce2a8fdf0b812699 Mon Sep 17 00:00:00 2001 From: Sean Poulter Date: Fri, 1 Mar 2024 16:23:33 -0500 Subject: [PATCH 6/6] Remove default value --- .github/workflows/expense.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/expense.yml b/.github/workflows/expense.yml index c5a5c53..05ff3a9 100644 --- a/.github/workflows/expense.yml +++ b/.github/workflows/expense.yml @@ -10,7 +10,6 @@ on: description: "The expense amount you like to grant for the contribution in $" required: true type: choice - default: "patch" options: - 15 - 25