From bdcc6145c1c0e8a520c243a00399aca3583cf55a Mon Sep 17 00:00:00 2001 From: Ahmad Nassri Date: Mon, 11 Oct 2021 22:03:05 -0400 Subject: [PATCH] chore(template): sync with ahmadnassri/template-node-lib --- .github/FUNDING.yml | 4 +++ .github/workflows/pull_request_target.yml | 1 - .github/workflows/push.yml | 40 +++++++++++++---------- docker-compose.yml | 3 +- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index f2ca348..2daa442 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,5 @@ +# ------------------------------------------------------------- # +# Note: this file is automatically managed in template-template # +# ------------------------------------------------------------- # + github: [ahmadnassri] diff --git a/.github/workflows/pull_request_target.yml b/.github/workflows/pull_request_target.yml index cd1397e..2c75454 100644 --- a/.github/workflows/pull_request_target.yml +++ b/.github/workflows/pull_request_target.yml @@ -48,6 +48,5 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} - uses: ahmadnassri/action-workflow-queue@v1.1 - uses: ahmadnassri/action-template-repository-sync@v1.6.0 - - uses: ahmadnassri/action-workflow-queue@v1.1 with: github-token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7f55dba..d491e08 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -2,7 +2,9 @@ # Note: this file is automatically managed in template-node-lib # # ------------------------------------------------------------- # -on: push +on: + - push + - workflow_dispatch name: push @@ -41,7 +43,7 @@ jobs: with: fetch-depth: 0 - - uses: github/super-linter@v4.0.2 + - uses: github/super-linter/slim@v4 env: LOG_LEVEL: ERROR VALIDATE_ALL_CODEBASE: false @@ -61,6 +63,11 @@ jobs: - run: npm audit --audit-level=critical test-strategy: + needs: + - commit-lint + - super-linter + - npm-audit + timeout-minutes: 5 runs-on: ubuntu-latest @@ -74,11 +81,7 @@ jobs: run: echo "::set-output name=matrix::$(jq -c . < .github/matrix.json)" test-run: - needs: - - commit-lint - - super-linter - - npm-audit - - test-strategy + needs: test-strategy timeout-minutes: 5 @@ -98,7 +101,7 @@ jobs: with: submodules: true - - uses: actions/cache@v2.1.6 + - uses: actions/cache@v2.1.5 with: path: ~/.npm key: ${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }} @@ -140,7 +143,7 @@ jobs: runs-on: ubuntu-latest - if: needs.release.outputs.published == 'true' + if: ${{ needs.release.outputs.published == 'true' }} steps: - uses: actions/checkout@v2 @@ -154,29 +157,30 @@ jobs: - name: publish to github registry run: | - jq '.name = "@'${GITHUB_REPOSITORY/node-/}'"' package.json > /tmp/package.json; mv /tmp/package.json . + jq '.name = "@'"${GITHUB_REPOSITORY/node-/}"'"' package.json > /tmp/package.json; mv /tmp/package.json . npm version --no-git-tag-version v${{ needs.release.outputs.version }} npm publish + template-sync: + timeout-minutes: 20 + needs: - metadata - - release - - timeout-minutes: 20 + - test-run + - commit-lint + - super-linter # only runs on main branch and only for the template - if: ${{ github.ref == 'refs/heads/master' && - fromJSON(needs.metadata.outputs.repository).is_template }} + if: ${{ github.ref == 'refs/heads/master' && fromJSON(needs.metadata.outputs.repository).is_template }} runs-on: ubuntu-latest steps: - - uses: ahmadnassri/action-workflow-queue@v1 + - uses: ahmadnassri/action-workflow-queue@v1.1 - uses: actions/checkout@v2 - - uses: ahmadnassri/action-template-repository-sync@v1 + - uses: ahmadnassri/action-template-repository-sync@v1.6.0 with: github-token: ${{ secrets.GH_TOKEN }} - dry-run: true diff --git a/docker-compose.yml b/docker-compose.yml index 6452957..29737e0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ x-node: &node services: # ---- super-linter ---- # lint: - image: github/super-linter:v3 + image: github/super-linter:slim-v4 volumes: - ./:/github/workspace environment: @@ -34,6 +34,7 @@ services: - ./:/data command: --defaults=.pandoc.yml + # ---- test runner ---- # test: <<: *node image: node:alpine