From 029cd44c39dbb7e2c054a676f8b032cba33cdf59 Mon Sep 17 00:00:00 2001 From: Ahmad Nassri Date: Mon, 11 Oct 2021 22:03:10 -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 | 42 +++++++++++++---------- .pandoc.yml | 11 ++++++ docker-compose.yml | 21 +++++------- 5 files changed, 46 insertions(+), 33 deletions(-) create mode 100644 .pandoc.yml 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 bd83b91..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') }} @@ -123,7 +126,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - token: ${{ secrets.GH_TOKEN }} + submodules: true - id: release uses: ahmadnassri/action-semantic-release@v1 @@ -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/.pandoc.yml b/.pandoc.yml new file mode 100644 index 0000000..6684462 --- /dev/null +++ b/.pandoc.yml @@ -0,0 +1,11 @@ +input-file: docs/README.md +output-file: README.md +metadata-file: colophon.yml +template: docs/README.template + +from: gfm +to: gfm + +wrap: preserve +reference-links: true +fail-if-warnings: false diff --git a/docker-compose.yml b/docker-compose.yml index eab72a1..29737e0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,30 +16,25 @@ x-node: &node services: # ---- super-linter ---- # lint: - image: github/super-linter:v3 + image: github/super-linter:slim-v4 volumes: - - ./:/tmp/lint + - ./:/github/workspace environment: RUN_LOCAL: 'true' LOG_LEVEL: 'ERROR' MULTI_STATUS: 'false' + IGNORE_GITIGNORED_FILES: 'true' + DEFAULT_WORKSPACE: /github/workspace + FILTER_REGEX_EXCLUDE: '/github/workspace/README.md|test/fixtures/*' # ---- readme generator ---- # readme: - image: pandoc/core:2.11.4 + image: pandoc/core:2.13 volumes: - ./:/data - command: >- - --metadata-file=colophon.yml - --template=docs/README.template - --output=README.md - --from=gfm - --to=gfm - --fail-if-warnings - --wrap=preserve - --reference-links - docs/README.md + command: --defaults=.pandoc.yml + # ---- test runner ---- # test: <<: *node image: node:alpine