From 676bfce7e10f4c1cb48ee965344c023ac0ae767d Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 3 Aug 2026 10:24:46 -0700 Subject: [PATCH] replace legacy CI credentials --- .github/workflows/ci.yml | 11 ++++++++--- .github/workflows/daily.yml | 5 ++++- lib.sh | 11 ++--------- lib/git.sh | 11 ++--------- 4 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40f1752..6d51427 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,25 +7,30 @@ concurrency: jobs: ci: runs-on: ubuntu-latest + permissions: + actions: read + contents: read steps: - uses: actions/checkout@v3 - run: COLOR=1 ./ci/ci.sh env: - GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} nofixups: runs-on: ubuntu-latest + permissions: + contents: read steps: - uses: actions/checkout@v3 - run: COLOR=1 ./bin/nofixups.sh env: - GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} signed: runs-on: ubuntu-latest + permissions: + contents: read steps: - uses: actions/checkout@v3 - run: COLOR=1 ./bin/ensure_signed.sh env: - GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 4894221..be31132 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -10,9 +10,12 @@ concurrency: jobs: ci: runs-on: ubuntu-latest + permissions: + actions: read + contents: read steps: - uses: actions/checkout@v3 - run: COLOR=1 CI_FORCE=1 ./ci/ci.sh env: - GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/lib.sh b/lib.sh index 88983f6..da5d74f 100644 --- a/lib.sh +++ b/lib.sh @@ -361,13 +361,6 @@ git_commit_count() { (git rev-list HEAD --count 2>/dev/null) || echo 0 } -configure_github_token() { - git config --global credential.helper store - cat > ~/.git-credentials </dev/null) || echo 0 } -configure_github_token() { - git config --global credential.helper store - cat > ~/.git-credentials <