Skip to content

Commit

Permalink
Merge pull request #4922 from relative-ci/use-shared-action
Browse files Browse the repository at this point in the history
build: Use action from relative-ci/.github
  • Loading branch information
vio authored Jan 9, 2025
2 parents 7e3852d + 26ef91a commit f2b76f5
Showing 1 changed file with 25 additions and 91 deletions.
116 changes: 25 additions & 91 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,8 @@ jobs:
steps:
- uses: actions/[email protected]

# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT

- name: Use Node.js
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: ${{ steps.cache.outputs.PACKAGE }}

- name: Install dependencies
run: npm ci
- name: Setup node & npm
uses: relative-ci/.github/actions/setup-node-npm@main

- name: Build
run: npm run build
Expand Down Expand Up @@ -72,21 +60,8 @@ jobs:
steps:
- uses: actions/[email protected]

# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT

- name: Use Node.js
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: ${{ steps.cache.outputs.PACKAGE }}

# Workaround npm/nx optional install issue - https://github.com/nrwl/nx/issues/15452
- name: Install dependencies
run: npm ci
- name: Setup node & npm
uses: relative-ci/.github/actions/setup-node-npm@main

- name: Download build files
uses: actions/[email protected]
Expand All @@ -103,21 +78,8 @@ jobs:
steps:
- uses: actions/[email protected]

# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT

- name: Use Node.js
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: ${{ steps.cache.outputs.PACKAGE }}

# Workaround npm/nx optional install issue - https://github.com/nrwl/nx/issues/15452
- name: Install dependencies
run: npm ci
- name: Setup node & npm
uses: relative-ci/.github/actions/setup-node-npm@main

- name: Download build files
uses: actions/[email protected]
Expand All @@ -134,21 +96,8 @@ jobs:
steps:
- uses: actions/[email protected]

# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT

- name: Use Node.js
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: ${{ steps.cache.outputs.PACKAGE }}

# Workaround npm/nx optional install issue - https://github.com/nrwl/nx/issues/15452
- name: Install dependencies
run: npm ci
- name: Setup node & npm
uses: relative-ci/.github/actions/setup-node-npm@main

- name: Download build files
uses: actions/[email protected]
Expand Down Expand Up @@ -176,17 +125,12 @@ jobs:
steps:
- uses: actions/[email protected]

# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT

- name: Use Node.js
uses: actions/[email protected]
- name: Setup node & npm
uses: relative-ci/.github/actions/setup-node-npm@main
with:
node-version: ${{ matrix.node }}
cache: ${{ steps.cache.outputs.PACKAGE }}
version: ${{ matrix.node }}
cache: never
install: false

- name: Download build files
uses: actions/[email protected]
Expand Down Expand Up @@ -233,10 +177,12 @@ jobs:
steps:
- uses: actions/[email protected]

- name: Use Node.js
uses: actions/setup-node@v4.1.0
- name: Setup node & npm
uses: relative-ci/.github/actions/setup-node-npm@main
with:
node-version: ${{ matrix.node }}
version: ${{ matrix.node }}
cache: never
install: false

- name: Download build files
uses: actions/[email protected]
Expand Down Expand Up @@ -277,10 +223,12 @@ jobs:
steps:
- uses: actions/[email protected]

- name: Use Node.js
uses: actions/setup-node@v4.1.0
- name: Setup node & npm
uses: relative-ci/.github/actions/setup-node-npm@main
with:
node-version: ${{ matrix.node }}
version: ${{ matrix.node }}
cache: never
install: false

- name: Download build files
uses: actions/[email protected]
Expand Down Expand Up @@ -331,22 +279,8 @@ jobs:
steps:
- uses: actions/[email protected]

# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT

- name: Use Node.js
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: ${{ steps.cache.outputs.PACKAGE }}
registry-url: 'https://registry.npmjs.org'

# Workaround npm/nx optional install issue - https://github.com/nrwl/nx/issues/15452
- name: Install dependencies
run: npm ci
- name: Setup node & npm
uses: relative-ci/.github/actions/setup-node-npm@main

- name: Download build
uses: actions/[email protected]
Expand Down

0 comments on commit f2b76f5

Please sign in to comment.