Skip to content

Commit

Permalink
fix: configure git creds (#633)
Browse files Browse the repository at this point in the history
* fix permissions + add author

* remove: testing on push

* move GATI token to end
  • Loading branch information
aalu1418 authored Mar 21, 2024
1 parent 1b6cdf4 commit 3b53498
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/open-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,9 @@ jobs:
create-commits-and-pr:
permissions:
id-token: write
contents: read
contents: write
runs-on: ubuntu-latest
steps:
- name: Setup GitHub Token
id: token
uses: smartcontractkit/.github/actions/setup-github-token@9e7cc0779934cae4a9028b8588c9adb64d8ce68c # [email protected]
with:
aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_SOLANA_CICD_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_RELENG_TEAM_GATI_LAMBDA_URL }}
aws-region: ${{ secrets.AWS_REGION }}
- uses: actions/checkout@v3 # checkout branch that it is called from
- uses: actions/setup-go@v3
with:
Expand All @@ -40,7 +33,7 @@ jobs:
- name: Check if changes + PR exists
id: check
env:
GITHUB_TOKEN: ${{ steps.token.outputs.access-token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
Expand All @@ -66,13 +59,21 @@ jobs:
repo: ${{ github.repository }}
branch: "${{ steps.run.outputs.name }}"
env:
GITHUB_TOKEN: ${{ steps.token.outputs.access-token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Cleanup branch"
if: '!steps.check.outputs.skip'
run: |
git reset --hard
git branch --set-upstream-to=origin/${{ steps.run.outputs.name }}
git pull
- name: Setup GitHub Token
if: '!steps.check.outputs.skip'
id: token
uses: smartcontractkit/.github/actions/setup-github-token@9e7cc0779934cae4a9028b8588c9adb64d8ce68c # [email protected]
with:
aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_SOLANA_CICD_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_RELENG_TEAM_GATI_LAMBDA_URL }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Create pull request
if: '!steps.check.outputs.skip'
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
Expand Down

0 comments on commit 3b53498

Please sign in to comment.