From b5c2eb66170b38bda1e49ad5bb5cf02bd13eb8e4 Mon Sep 17 00:00:00 2001 From: Sebastian Pekarek Date: Fri, 20 May 2022 01:46:58 +0200 Subject: [PATCH] Revert "ci: Remove GH_TOKEN and use GITHUB_TOKEN" This reverts commit 4bf0005c52c1a5033f61e5b4accc75ce39eb990a. It just doesn't work. # Conflicts: # .github/workflows/test-release.yml --- .github/workflows/is-semantic-pr.yml | 2 +- .github/workflows/release-bot.yml | 5 +---- .github/workflows/stale-issues.yml | 2 +- .github/workflows/template-updater.yml | 5 +---- .github/workflows/test-release.yml | 12 +++--------- 5 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/is-semantic-pr.yml b/.github/workflows/is-semantic-pr.yml index 9031ffb3c..5b4b7db94 100644 --- a/.github/workflows/is-semantic-pr.yml +++ b/.github/workflows/is-semantic-pr.yml @@ -9,4 +9,4 @@ jobs: - name: ๐Ÿค– is-semantic-release uses: sebbo2002/action-is-semantic-pr@develop with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/release-bot.yml b/.github/workflows/release-bot.yml index 455a07727..685c0ae60 100644 --- a/.github/workflows/release-bot.yml +++ b/.github/workflows/release-bot.yml @@ -10,9 +10,6 @@ jobs: release-bot: runs-on: ubuntu-latest if: ${{ github.repository != 'sebbo2002/js-template' }} - permissions: - contents: write - pull-requests: write steps: - name: โ˜๏ธ Checkout Project uses: actions/checkout@v3 @@ -32,4 +29,4 @@ jobs: - name: ๐Ÿค– Run ReleaseBot uses: ./.actions/release-bot with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index 6062f4f4e..dd2b8fcc1 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -10,7 +10,7 @@ jobs: - name: ๐Ÿงน Cleanup issues & pull requests uses: actions/stale@v5 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GH_TOKEN }} stale-issue-message: | This issue has been automatically marked as stale because it has not had recent activity :sleeping: It will be closed in 14 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation. diff --git a/.github/workflows/template-updater.yml b/.github/workflows/template-updater.yml index 4610e961a..b56b07b5c 100644 --- a/.github/workflows/template-updater.yml +++ b/.github/workflows/template-updater.yml @@ -8,13 +8,10 @@ jobs: TemplateUpdater: runs-on: ubuntu-latest if: ${{ github.repository != 'sebbo2002/js-template' }} - permissions: - contents: write - pull-requests: write steps: - name: ๐Ÿค– is-semantic-release uses: sebbo2002/action-template-updater@develop with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GH_TOKEN }} template: sebbo2002/js-template assignees: sebbo2002 diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index e2ca677b5..caefa6ea8 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -70,12 +70,6 @@ jobs: - tests - license-checker if: ${{ github.repository != 'sebbo2002/js-template' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }} - permissions: - contents: write - issues: write - pull-requests: write - packages: write - pages: write steps: - name: โ˜๏ธ Checkout Project uses: actions/checkout@v3 @@ -91,17 +85,17 @@ jobs: run: BRANCH=${GITHUB_REF#refs/heads/} npx semantic-release env: GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_OWNER: ${{ github.repository_owner }} GITHUB_NPM_CONFIG_REGISTRY: https://npm.pkg.github.com/ - GITHUB_NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_NPM_TOKEN: ${{ secrets.GH_TOKEN }} PUBLIC_NPM_CONFIG_REGISTRY: https://registry.npmjs.org PUBLIC_NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: ๐Ÿ”ƒ Merge main back into develop if: ${{ github.ref == 'refs/heads/main' }} uses: everlytic/branch-merge@1.1.2 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GH_TOKEN }} source_ref: 'main' target_branch: 'develop' commit_message_template: 'Merge branch {source_ref} into {target_branch} [skip ci]'