Skip to content

Commit

Permalink
Disabled FORCE_COLOR on setup-node GitHub Action
Browse files Browse the repository at this point in the history
refs #13716
refs actions/setup-node#317 (comment)

- the `setup-node` GitHub Action seems to use a shell command to get the
  cache path, but these are colorised when `FORCE_COLOR` is enabled
- this causes the Action to fail to read the path correctly
- the comment referenced above suggests to remove `FORCE_COLOR` but it's
  nice to have colored output for our tests
- instead, I'm disabling the environment variable on the `setup-node`
  action so it still works
- I've tested with the referenced PR and this unblocks dependency caching 🎉
  • Loading branch information
daniellockyer committed Nov 25, 2021
1 parent 9655ad1 commit aec14e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
fetch-depth: 0
submodules: true
- uses: actions/setup-node@v2
env:
FORCE_COLOR: 0
with:
node-version: '14.17.0'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
fetch-depth: 0
submodules: true
- uses: actions/setup-node@v2
env:
FORCE_COLOR: 0
with:
node-version: '14'

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
env:
FORCE_COLOR: 0
with:
node-version: '14.17.0'
- run: yarn
Expand Down Expand Up @@ -49,6 +51,8 @@ jobs:
fetch-depth: 0
submodules: true
- uses: actions/setup-node@v2
env:
FORCE_COLOR: 0
with:
node-version: '14.17.0'

Expand Down Expand Up @@ -90,6 +94,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
env:
FORCE_COLOR: 0
with:
node-version: ${{ matrix.node }}

Expand Down Expand Up @@ -174,6 +180,8 @@ jobs:
fetch-depth: 0
submodules: true
- uses: actions/setup-node@v2
env:
FORCE_COLOR: 0
with:
node-version: '12.22.1'
- run: npm install -g ghost-cli@latest
Expand Down

0 comments on commit aec14e5

Please sign in to comment.