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 Jul 28, 2022
1 parent 23a7797 commit a60fd97
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ jobs:
steps:
- uses: actions/[email protected]

- uses: actions/[email protected]
- uses: actions/[email protected]
with:
registry-url: https://npm.pkg.github.com
node-version: latest
cache: npm

- run: npm audit --audit-level=critical

Expand All @@ -84,8 +88,6 @@ jobs:

test-run:
needs:
- commit-lint
- super-linter
- npm-audit
- test-strategy

Expand All @@ -99,24 +101,23 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}

- uses: actions/[email protected]
with:
submodules: true

- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
registry-url: https://npm.pkg.github.com
node-version: ${{ matrix.node-version }}
cache: npm

- run: npm ci
- run: npm run test:ci

release:
needs:
- commit-lint
- super-linter
- metadata
- test-run

Expand All @@ -139,7 +140,7 @@ jobs:
submodules: true

- id: release
uses: ahmadnassri/action-semantic-release@v1
uses: ahmadnassri/action-semantic-release@v2
with:
config: ${{ github.workspace }}/.semantic.json
env:
Expand All @@ -160,12 +161,14 @@ jobs:
with:
submodules: true

- uses: ahmadnassri/action-github-registry-npm-proxy@v2
- uses: actions/[email protected]
with:
token: ${{ secrets.GH_TOKEN }}
scope: ${{ github.repository_owner }}
registry-url: https://npm.pkg.github.com
node-version: latest

- name: publish to github registry
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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 }}"
Expand All @@ -187,14 +190,14 @@ jobs:
with:
submodules: true

- uses: actions/cache@v2.1.7
- uses: actions/cache@v3.0.5
with:
path: /tmp/.buildx-cache
key: buildx-${{ github.sha }}
restore-keys: buildx-

- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/setup-buildx-action@v2

# login to docker hub
- uses: docker/login-action@v2
Expand All @@ -214,7 +217,7 @@ jobs:
echo "::set-output name=name::${{ github.repository_owner }}/$(basename "${GITHUB_REPOSITORY/node-//}")"
# publish
- uses: docker/build-push-action@v2
- uses: docker/build-push-action@v3
with:
push: true
cache-from: type=local,src=/tmp/.buildx-cache
Expand Down
2 changes: 0 additions & 2 deletions docs/README.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ $about.description$

[![license][license-img]][license-url]
[![release][release-img]][release-url]
[![super linter][super-linter-img]][super-linter-url]
[![test][test-img]][test-url]
[![semantic][semantic-img]][semantic-url]

$body$
Expand Down

0 comments on commit a60fd97

Please sign in to comment.