Skip to content

Commit

Permalink
[internal] Setup toolchain auth when bootstrapping pants. (pantsbuild…
Browse files Browse the repository at this point in the history
…#12025)

Without this step on push/scheduled builds the toolchain plugin tries to get a restricted access token which is not desirable
  • Loading branch information
asherf authored May 7, 2021
1 parent 0f59597 commit 2c0013d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ jobs:
echo "EOF" >> $GITHUB_ENV
'
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ jobs:
echo "EOF" >> $GITHUB_ENV
'
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand Down
1 change: 1 addition & 0 deletions build-support/bin/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ def test_workflow_jobs(python_versions: list[str], *, cron: bool) -> Jobs:
"timeout-minutes": 40,
"steps": [
*checkout(),
setup_toolchain_auth(),
*setup_primary_python(),
*bootstrap_caches(),
{"name": "Bootstrap Pants", "run": "./pants --version\n"},
Expand Down

0 comments on commit 2c0013d

Please sign in to comment.