Skip to content

Commit

Permalink
chore(template): sync with ahmadnassri/template-node-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Oct 12, 2021
1 parent a3d84c8 commit bdcc614
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# ------------------------------------------------------------- #
# Note: this file is automatically managed in template-template #
# ------------------------------------------------------------- #

github: [ahmadnassri]
1 change: 0 additions & 1 deletion .github/workflows/pull_request_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
- uses: ahmadnassri/[email protected]
- uses: ahmadnassri/[email protected]
- uses: ahmadnassri/[email protected]
with:
github-token: ${{ secrets.GH_TOKEN }}
40 changes: 22 additions & 18 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# Note: this file is automatically managed in template-node-lib #
# ------------------------------------------------------------- #

on: push
on:
- push
- workflow_dispatch

name: push

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -98,7 +101,7 @@ jobs:
with:
submodules: true

- uses: actions/[email protected].6
- uses: actions/[email protected].5
with:
path: ~/.npm
key: ${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -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
Expand All @@ -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
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -34,6 +34,7 @@ services:
- ./:/data
command: --defaults=.pandoc.yml

# ---- test runner ---- #
test:
<<: *node
image: node:alpine
Expand Down

0 comments on commit bdcc614

Please sign in to comment.