diff options
author | Nextcloud bot <bot@nextcloud.com> | 2021-07-24 10:34:25 +0300 |
---|---|---|
committer | Nextcloud bot <bot@nextcloud.com> | 2021-07-24 10:34:25 +0300 |
commit | 2d0b1f8f1743fe0ed6fafd482574f3767d08970a (patch) | |
tree | 3cd0fe9fb02ef81bc302937c35132c37517347b4 | |
parent | 6083bd89619bf5c5054f79be8cf10667e1dd943c (diff) |
Updating node.yml workflow from template
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
-rw-r--r-- | .github/workflows/node.yml | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index f44150d..4b20eb5 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -1,3 +1,8 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + name: Node on: @@ -11,18 +16,25 @@ jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-versions: [12.x] - - name: node${{ matrix.node-versions }} + name: node steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@v1.1 + id: versions + with: + fallbackNode: '^12' + fallbackNpm: '^6' - - name: Set up node ${{ matrix.node-versions }} - uses: actions/setup-node@v1 + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-versions }} + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies & build run: | @@ -31,4 +43,10 @@ jobs: - name: Check webpack build changes run: | - bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && git status && exit 1 )" + bash -c "[[ ! \"`git status --porcelain `\" ]] || exit 1" + + - name: Show changes on failure + if: failure() + run: | + git status + git --no-pager diff |