Skip to content

Commit d9f2181

Browse files
committed
chore(template): sync with ahmadnassri/template-node-lib
1 parent 78820d8 commit d9f2181

5 files changed

Lines changed: 45 additions & 32 deletions

File tree

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# ------------------------------------------------------------- #
2+
# Note: this file is automatically managed in template-template #
3+
# ------------------------------------------------------------- #
4+
15
github: [ahmadnassri]

.github/workflows/pull_request_target.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,5 @@ jobs:
4848
ref: ${{ github.event.pull_request.head.ref }}
4949
- uses: ahmadnassri/action-workflow-queue@v1.1
5050
- uses: ahmadnassri/action-template-repository-sync@v1.6.0
51-
- uses: ahmadnassri/action-workflow-queue@v1.1
5251
with:
5352
github-token: ${{ secrets.GH_TOKEN }}

.github/workflows/push.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Note: this file is automatically managed in template-node-lib #
33
# ------------------------------------------------------------- #
44

5-
on: push
5+
on:
6+
- push
7+
- workflow_dispatch
68

79
name: push
810

@@ -41,7 +43,7 @@ jobs:
4143
with:
4244
fetch-depth: 0
4345

44-
- uses: github/super-linter@v4.0.2
46+
- uses: github/super-linter/slim@v4
4547
env:
4648
LOG_LEVEL: ERROR
4749
VALIDATE_ALL_CODEBASE: false
@@ -61,6 +63,11 @@ jobs:
6163
- run: npm audit --audit-level=critical
6264

6365
test-strategy:
66+
needs:
67+
- commit-lint
68+
- super-linter
69+
- npm-audit
70+
6471
timeout-minutes: 5
6572

6673
runs-on: ubuntu-latest
@@ -74,11 +81,7 @@ jobs:
7481
run: echo "::set-output name=matrix::$(jq -c . < .github/matrix.json)"
7582

7683
test-run:
77-
needs:
78-
- commit-lint
79-
- super-linter
80-
- npm-audit
81-
- test-strategy
84+
needs: test-strategy
8285

8386
timeout-minutes: 5
8487

@@ -98,7 +101,7 @@ jobs:
98101
with:
99102
submodules: true
100103

101-
- uses: actions/cache@v2.1.6
104+
- uses: actions/cache@v2.1.5
102105
with:
103106
path: ~/.npm
104107
key: ${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
@@ -140,7 +143,7 @@ jobs:
140143

141144
runs-on: ubuntu-latest
142145

143-
if: needs.release.outputs.published == 'true'
146+
if: ${{ needs.release.outputs.published == 'true' }}
144147

145148
steps:
146149
- uses: actions/checkout@v2
@@ -154,29 +157,30 @@ jobs:
154157

155158
- name: publish to github registry
156159
run: |
157-
jq '.name = "@'${GITHUB_REPOSITORY/node-/}'"' package.json > /tmp/package.json; mv /tmp/package.json .
160+
jq '.name = "@'"${GITHUB_REPOSITORY/node-/}"'"' package.json > /tmp/package.json; mv /tmp/package.json .
158161
npm version --no-git-tag-version v${{ needs.release.outputs.version }}
159162
npm publish
160163
164+
161165
template-sync:
166+
timeout-minutes: 20
167+
162168
needs:
163169
- metadata
164-
- release
165-
166-
timeout-minutes: 20
170+
- test-run
171+
- commit-lint
172+
- super-linter
167173

168174
# only runs on main branch and only for the template
169-
if: ${{ github.ref == 'refs/heads/master' &&
170-
fromJSON(needs.metadata.outputs.repository).is_template }}
175+
if: ${{ github.ref == 'refs/heads/master' && fromJSON(needs.metadata.outputs.repository).is_template }}
171176

172177
runs-on: ubuntu-latest
173178

174179
steps:
175-
- uses: ahmadnassri/action-workflow-queue@v1
180+
- uses: ahmadnassri/action-workflow-queue@v1.1
176181

177182
- uses: actions/checkout@v2
178183

179-
- uses: ahmadnassri/action-template-repository-sync@v1
184+
- uses: ahmadnassri/action-template-repository-sync@v1.6.0
180185
with:
181186
github-token: ${{ secrets.GH_TOKEN }}
182-
dry-run: true

.pandoc.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
input-file: docs/README.md
2+
output-file: README.md
3+
metadata-file: colophon.yml
4+
template: docs/README.template
5+
6+
from: gfm
7+
to: gfm
8+
9+
wrap: preserve
10+
reference-links: true
11+
fail-if-warnings: false

docker-compose.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,25 @@ x-node: &node
1616
services:
1717
# ---- super-linter ---- #
1818
lint:
19-
image: github/super-linter:v3
19+
image: github/super-linter:slim-v4
2020
volumes:
21-
- ./:/tmp/lint
21+
- ./:/github/workspace
2222
environment:
2323
RUN_LOCAL: 'true'
2424
LOG_LEVEL: 'ERROR'
2525
MULTI_STATUS: 'false'
26+
IGNORE_GITIGNORED_FILES: 'true'
27+
DEFAULT_WORKSPACE: /github/workspace
28+
FILTER_REGEX_EXCLUDE: '/github/workspace/README.md|test/fixtures/*'
2629

2730
# ---- readme generator ---- #
2831
readme:
29-
image: pandoc/core:2.11.4
32+
image: pandoc/core:2.13
3033
volumes:
3134
- ./:/data
32-
command: >-
33-
--metadata-file=colophon.yml
34-
--template=docs/README.template
35-
--output=README.md
36-
--from=gfm
37-
--to=gfm
38-
--fail-if-warnings
39-
--wrap=preserve
40-
--reference-links
41-
docs/README.md
35+
command: --defaults=.pandoc.yml
4236

37+
# ---- test runner ---- #
4338
test:
4439
<<: *node
4540
image: node:alpine

0 commit comments

Comments
 (0)