Skip to content

Commit

Permalink
fix: tokens in constants pr workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
koladilip committed Dec 10, 2024
1 parent e57aa07 commit 676e0b0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/raise-pr-for-constants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ jobs:
DEST_REPO="rudderlabs/rudder-sdk-js"
git clone https://github.com/${DEST_REPO}.git dest-repo || exit 1
cd dest-repo
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git config --global url."https://${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
git checkout ${{ env.BRANCH_NAME }} || git checkout -b ${{ env.BRANCH_NAME }}
- name: Compare Destinations.ts
Expand All @@ -46,17 +43,21 @@ jobs:
- name: Commit and Push Changes
if: steps.compare_files.outputs.pr_required == 'true'
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
cd dest-repo
cp "../generated/Destinations.ts" "packages/analytics-js-common/src/constants/integrations/Destinations.ts"
git add packages/analytics-js-common/src/constants/integrations/Destinations.ts
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git commit -m "fix: update destinations.ts"
git push origin ${{ env.BRANCH_NAME }}
- name: Create or Update PR
if: steps.compare_files.outputs.pr_required == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.PAT }}
run: |
cd dest-repo
EXISTING_PR=$(gh pr list --head ${{ env.BRANCH_NAME }} --json number --jq ".[0].number")
Expand Down

0 comments on commit 676e0b0

Please sign in to comment.