Skip to content

Commit

Permalink
Use textbook/take-action custom action
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Oct 21, 2023
1 parent e2ce6b2 commit ecde33b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.GH_DEPLOY_KEY }}
- uses: actions/setup-node@v3
- uses: textbook/take-action@nodejs
with:
cache: 'npm'
checkout: 'false'
node-version-file: '.nvmrc'
- run: |
git config --global user.name "gh-actions"
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvmrc
- uses: actions/setup-node@v3
- uses: textbook/take-action@nodejs
id: nodejs
with:
cache: 'npm'
node-version-file: '.nvmrc'
- run: ./bin/check-node.sh
- run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0
- run: npm run lint
Expand All @@ -31,19 +26,16 @@ jobs:
- uses: docker/build-push-action@v4
with:
build-args: |
NODE_RELEASE=${{ steps.nvmrc.outputs.NODE_VERSION }}
NODE_RELEASE=${{ steps.nodejs.outputs.node-version }}
context: .
push: false
tags: textbook/starter-kit
windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: textbook/take-action@nodejs
with:
cache: 'npm'
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run lint
- run: npm run test
env:
Expand All @@ -57,12 +49,9 @@ jobs:
matrix:
node: [ '18.3', '18', '20' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: textbook/take-action@nodejs
with:
cache: 'npm'
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run e2e
- run: npm run e2e:dev
deploy:
Expand Down
1 change: 0 additions & 1 deletion bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
The following executable scripts are provided:

- `build-info.sh`: Writes out a `build-info.txt` file to the `dist/static` directory to save when, where and from what commit the output was built
- `check-node.sh`: Ensures the running version of Node matches the `.nvmrc` configuration
- `cyf-branch.sh`: Prepares a Code Your Future version of the repo using the files in `files/`
- remove tests and related configuration
- remove CSP checking from Helmet configuration
Expand Down
16 changes: 0 additions & 16 deletions bin/check-node.sh

This file was deleted.

2 changes: 0 additions & 2 deletions bin/up-to-date.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ useNpm() {
npm --prefix="$HERE/.." "$@"
}

useNpm ci

if [ -z "$(useNpm outdated)" ]; then
echo 'All up to date'
exit 0
Expand Down

0 comments on commit ecde33b

Please sign in to comment.