From 58ba02b1e768702eba9f7df567d047ad1e21a605 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Wed, 16 Oct 2024 10:56:57 -0600 Subject: [PATCH] use PAT --- .github/workflows/release_parallel.yml | 14 ++++---------- .github/workflows/test.yml | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release_parallel.yml b/.github/workflows/release_parallel.yml index 77a07b97f6..80b329020d 100644 --- a/.github/workflows/release_parallel.yml +++ b/.github/workflows/release_parallel.yml @@ -165,6 +165,8 @@ jobs: fetch-depth: 0 # Fetch all history for all branches and tags - name: Merge update branches + env: + PAT: ${{ secrets.WORKFLOW_PAT }} run: | git config --global user.name 'Jordan Last' git config --global user.email 'jordan.michael.last@gmail.com' @@ -194,21 +196,13 @@ jobs: echo "Deleted remote branch: $branch" done - # Push changes + # Push changes using PAT echo "Pushing changes to $CURRENT_BRANCH" - git push origin $CURRENT_BRANCH || { + git push https://$PAT@github.com/${{ github.repository }}.git HEAD:$CURRENT_BRANCH || { echo "Failed to push changes" exit 1 } - - name: Trigger tests - run: | - # Update a file to trigger the tests - echo "Release ${{ needs.prepare-release.outputs.release-version }} - $(date)" >> RELEASE.md - git add RELEASE.md - git commit -m "Trigger tests for release ${{ needs.prepare-release.outputs.release-version }}" - git push origin $CURRENT_BRANCH - - name: Create release run: | VERSION=${{ needs.prepare-release.outputs.release-version }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a958115b6..47c06654ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: push: branches: - main - pull_request: # Runs on pull requests to any branch + pull_request: jobs: determine-should-run-tests: