From 2d9918c219aabc30710611c35a23d9d55fc06acf Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Sat, 13 May 2023 06:36:45 +0000 Subject: [PATCH] fix tokens usage --- .github/workflows/ci.yml | 7 +++---- .github/workflows/update_status.yml | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14971cab..088ca4ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ permissions: contents: write env: - GITHUB_TOKEN: ${{ secrets.issue_github_token }} CONAN_SYSREQUIRES_MODE: enabled PYTHONUNBUFFERED: 1 @@ -98,7 +97,7 @@ jobs: - name: Clone CCI run: | - git clone https://${{ github.repository_owner }}:$GITHUB_TOKEN@github.com/${{ github.repository_owner }}/conan-center-index.git + git clone https://qchateau:${{ secrets.issue_github_token }}@github.com/conan-center-bot-testing/conan-center-index.git cd conan-center-index git remote add upstream https://github.com/conan-io/conan-center-index.git git fetch upstream @@ -111,7 +110,7 @@ jobs: mkdir status conan-center-bot auto-update-recipes \ --cci conan-center-index \ - --github-token "$GITHUB_TOKEN" \ + --github-token "${{ secrets.issue_github_token }}" \ --push-to origin \ --branch-prefix dev/ccb- > ./status/v1-update.json @@ -121,7 +120,7 @@ jobs: run: | conan-center-bot update-status-issue \ --no-link-pr \ - --github-token "$GITHUB_TOKEN" \ + --github-token "${{ secrets.issue_github_token }}" \ ./status/v1-update.json \ https://github.com/${{ github.repository }}/issues/4 diff --git a/.github/workflows/update_status.yml b/.github/workflows/update_status.yml index ac513d19..4f4ec7ea 100644 --- a/.github/workflows/update_status.yml +++ b/.github/workflows/update_status.yml @@ -8,6 +8,9 @@ on: - cron: "0 */6 * * *" workflow_dispatch: +permissions: + contents: write + env: GITHUB_TOKEN: ${{ secrets.issue_github_token }} CONAN_SYSREQUIRES_MODE: enabled @@ -102,7 +105,7 @@ jobs: - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ env.GITHUB_TOKEN }} branch: status folder: status target-folder: prod