From a60fd973772258d4f3eebffe870fe94fabf3a4f0 Mon Sep 17 00:00:00 2001 From: Ahmad Nassri Date: Thu, 28 Jul 2022 01:22:49 -0400 Subject: [PATCH] chore(template): sync with ahmadnassri/template-node-lib --- .github/workflows/push.yml | 37 ++++++++++++++++++++----------------- docs/README.template | 2 -- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9ff50cf..20f9d45 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -65,7 +65,11 @@ jobs: steps: - uses: actions/checkout@v2.3.5 - - uses: actions/setup-node@v2.4.1 + - uses: actions/setup-node@v3.4.1 + 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/setup-node@v2.4.1 - with: - node-version: ${{ matrix.node-version }} - - uses: actions/checkout@v2.3.5 with: submodules: true - - uses: actions/cache@v2.1.7 + - uses: actions/setup-node@v3.4.1 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/setup-node@v3.4.1 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 diff --git a/docs/README.template b/docs/README.template index bafbd07..0b48409 100644 --- a/docs/README.template +++ b/docs/README.template @@ -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$