Disabled FORCE_COLOR on setup-node GitHub Action

refs https://github.com/TryGhost/Ghost/pull/13716
refs https://github.com/actions/setup-node/issues/317#issuecomment-929694556

- 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 🎉
This commit is contained in:
Daniel Lockyer 2021-11-25 09:07:45 +01:00
parent 9655ad1e88
commit aec14e5cf3
No known key found for this signature in database
GPG Key ID: D21186F0B47295AD
3 changed files with 12 additions and 0 deletions

View File

@ -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'

View File

@ -17,6 +17,8 @@ jobs:
fetch-depth: 0
submodules: true
- uses: actions/setup-node@v2
env:
FORCE_COLOR: 0
with:
node-version: '14'

View File

@ -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
@ -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'
@ -90,6 +94,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
env:
FORCE_COLOR: 0
with:
node-version: ${{ matrix.node }}
@ -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