Skip to content

Commit fbf9578

Browse files
committed
ci: remove pre-installed node from runner + upload logs on failure
1 parent b2c19d0 commit fbf9578

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v6
14+
- name: Remove runner-preinstalled Node
15+
run: sudo rm -f /usr/local/bin/node /usr/local/bin/npm /usr/local/bin/npx /usr/local/bin/corepack
16+
shell: bash
1417
- name: xo-install run
18+
id: install
1519
run: sudo ./xo-install.sh --install
1620
shell: bash
21+
continue-on-error: true
22+
- name: Upload install logs
23+
if: steps.install.outcome == 'failure'
24+
uses: actions/upload-artifact@v7
25+
with:
26+
name: xo-install-logs
27+
path: logs/
28+
if-no-files-found: warn
29+
- name: Fail if install failed
30+
if: steps.install.outcome == 'failure'
31+
run: exit 1
32+
shell: bash

0 commit comments

Comments
 (0)