-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(template): sync with ahmadnassri/template-node-lib
- Loading branch information
Ahmad Nassri
committed
Jul 28, 2022
1 parent
84ae78f
commit 0e2a5b8
Showing
2 changed files
with
20 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -84,8 +88,6 @@ jobs: | |
|
||
test-run: | ||
needs: | ||
- commit-lint | ||
- super-linter | ||
- npm-audit | ||
- test-strategy | ||
|
||
|
@@ -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 | ||
|
||
|
@@ -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: | ||
|
@@ -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 }}" | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters