Skip to content

Commit

Permalink
set ocobles as default user until we have an Equinix bot
Browse files Browse the repository at this point in the history
Signed-off-by: Oscar Cobles <[email protected]>
  • Loading branch information
Oscar Cobles committed Jul 17, 2024
1 parent bfbc4f9 commit ca4d348
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/actions/upgrade-provider/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ inputs:
required: false
default: false
pr-assign:
description: |
A user to assign the upgrade PR to
required: true
default: ${{ github.actor }}
description: 'A user to assign the upgrade PR to'
required: false
default: ""
pr-reviewers:
description: |
Handles of reviewers to assign the created PRs to. If empty, default reviewers are assigned.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/upgrade-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
target-bridge-version: ${{ inputs.target-bridge-version }}
pr-reviewers: ${{ inputs.pr-reviewers }}
pr-description: ${{ inputs.pr-description }}
pr-assign: ${{ github.actor }}
# TODO(ocobles) Set back when pr-assign is available or we have an Equinix bot token
# - name: Call upgrade provider action
# if: github.event_name == 'repository_dispatch'
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/upgrade-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,21 @@ on:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_PR_ASSIGN: ocobles
jobs:
upgrade_provider:
if: ${{ contains(github.event.issue.title, 'Upgrade terraform-provider-') || github.event_name == 'workflow_dispatch' }}
name: upgrade-provider
runs-on: ubuntu-latest
steps:
- name: Set pr-assign variable
id: set-pr-assign
run: |
if [ "${{ github.actor }}" == "github-actions[bot]" ]; then
echo "PR_ASSIGN=${{ env.DEFAULT_PR_ASSIGN }}" >> $GITHUB_ENV
else
echo "PR_ASSIGN=${{ github.actor }}" >> $GITHUB_ENV
fi
- name: Call upgrade provider action
# TODO(ocobles): upgrade-provider tool tries to assign the PR to the user who created it.
# Since we don't have an Equinix bot user, we are using the GITHUB_TOKEN. This results in an
Expand All @@ -30,3 +39,4 @@ jobs:
kind: all
email: [email protected]
username: GitHub
pr-assign: ${{ env.PR_ASSIGN }}

0 comments on commit ca4d348

Please sign in to comment.