Skip to content

Commit

Permalink
Fix CI lint secrets permission error and macOS GHA runner homebrew PA…
Browse files Browse the repository at this point in the history
…TH bug (#55)

* fix(ci): use GITHUB_TOKEN instead of secret to allow external PR lint

* fix(ci): deal with gha macos homebrew symlink bug
  • Loading branch information
fdintino authored Jul 3, 2024
1 parent a6d6dd1 commit df4f409
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
- name: Set environment variables
run: |
echo "REPORTER=${{ github.event_name == 'pull_request' && 'github-pr-review' || 'github-check' }}" >> $GITHUB_ENV
echo "REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}" >> $GITHUB_ENV
echo "REVIEWDOG_TOKEN=${{ secrets.REVIEWDOG_TOKEN }}" >> $GITHUB_ENV
echo "REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- name: clang-format
uses: DoozyX/clang-format-lint-action@v0.14
Expand All @@ -34,14 +33,14 @@ jobs:
- name: flake8
uses: reviewdog/action-flake8@v3
with:
github_token: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: ${{ env.REPORTER }}
filter_mode: nofilter

- name: black
uses: reviewdog/action-black@v3
with:
github_token: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: ${{ env.REPORTER }}
filter_mode: nofilter

7 changes: 6 additions & 1 deletion .github/workflows/macos-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

set -e

brew reinstall cmake
# See https://github.com/actions/runner-images/issues/9471 for why we have
# brew unlink and brew link commands here
brew unlink cmake || true
brew reinstall cmake || true
brew link --overwrite cmake

brew install dav1d aom rav1e

if [ "$GHA_PYTHON_VERSION" == "2.7" ]; then
Expand Down

0 comments on commit df4f409

Please sign in to comment.