From 9cd00cea22e7c5d635dc9fa64cc44489ca106ccf Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Mon, 12 Feb 2024 22:52:20 -0800 Subject: [PATCH] add expense workflow --- .github/workflows/expense.yml | 71 +++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/expense.yml diff --git a/.github/workflows/expense.yml b/.github/workflows/expense.yml new file mode 100644 index 00000000..c359d4ad --- /dev/null +++ b/.github/workflows/expense.yml @@ -0,0 +1,71 @@ +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: + - 25 + - 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.WDIO_BOT_GITHUB_TOKEN }} + expense: + permissions: + contents: write + id-token: write + needs: [authorize] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "main" + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 20.x + - name: Run Expense Flow + uses: webdriverio/expense-action@v0.0.5 + 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 }}