From b9ddf83aa1b31a1c318ae2bc52a17a9b4f63300b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Skytte=20Randl=C3=B8v?= Date: Mon, 19 Feb 2024 13:56:18 +0100 Subject: [PATCH] fix(push-workflows): Use GH_PAT directly --- .github/workflows/document.yaml | 6 +++--- .github/workflows/render-readme.yaml | 6 +++--- .github/workflows/update-lockfile.yaml | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/document.yaml b/.github/workflows/document.yaml index 9b8432c4..007f455e 100644 --- a/.github/workflows/document.yaml +++ b/.github/workflows/document.yaml @@ -17,8 +17,7 @@ jobs: if: ${{ inputs.run }} name: 📖 Document runs-on: ubuntu-latest - env: - GH_PAT: ${{ secrets.GH_PAT }} + steps: - name: Checkout repo uses: actions/checkout@v4 @@ -48,4 +47,5 @@ jobs: git switch ${{ inputs.branch_name }} git add man/\* NAMESPACE DESCRIPTION git commit -m "docs: update documentation" || echo "No changes to commit" - git push + git remote set-url origin https://$GITHUB_ACTOR:${{ secrets.GH_PAT }}@github.com/$GITHUB_REPOSITORY.git + git push origin ${{ inputs.branch_name }} diff --git a/.github/workflows/render-readme.yaml b/.github/workflows/render-readme.yaml index 6415cf13..845df6a2 100644 --- a/.github/workflows/render-readme.yaml +++ b/.github/workflows/render-readme.yaml @@ -13,8 +13,7 @@ jobs: if: ${{ inputs.run }} name: 📖 README runs-on: ubuntu-latest - env: - GH_PAT: ${{ secrets.GH_PAT }} + steps: - name: Checkout repo uses: actions/checkout@v4 @@ -61,4 +60,5 @@ jobs: git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" git switch ${{ inputs.branch_name }} git commit README.md -m 'docs(README): Re-build README.Rmd' || echo "No changes to commit" - git push + git remote set-url origin https://$GITHUB_ACTOR:${{ secrets.GH_PAT }}@github.com/$GITHUB_REPOSITORY.git + git push origin ${{ inputs.branch_name }} diff --git a/.github/workflows/update-lockfile.yaml b/.github/workflows/update-lockfile.yaml index e349f788..f2404ecf 100644 --- a/.github/workflows/update-lockfile.yaml +++ b/.github/workflows/update-lockfile.yaml @@ -16,8 +16,6 @@ jobs: name: 🛠️ Store dependency versions if: ${{ inputs.run }} runs-on: ubuntu-latest - env: - GH_PAT: ${{ secrets.GH_PAT }} steps: - name: Checkout repo @@ -48,4 +46,5 @@ jobs: git switch ${{ inputs.branch_name }} git add pak.lock git commit -m "chore: update pak.lock" || echo "No changes to commit" - git push + git remote set-url origin https://$GITHUB_ACTOR:${{ secrets.GH_PAT }}@github.com/$GITHUB_REPOSITORY.git + git push origin ${{ inputs.branch_name }}