diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 282ee745..7b3a5500 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,11 +21,11 @@ jobs: runs-on: ubuntu-20.04 needs: test steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: '18.x' registry-url: 'https://registry.npmjs.org' - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: node-tgzs path: build/ @@ -46,10 +46,10 @@ jobs: steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: buildkitd-flags: --debug config-inline: | @@ -57,10 +57,10 @@ jobs: max-parallelism = 1 - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Login to the ${{ env.DOCKER_REGISTRY }} Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.DOCKER_REGISTRY }} username: ${{ env.DOCKER_REGISTRY == 'docker.io' && secrets.DOCKERHUB_USERNAME || github.actor }} @@ -68,7 +68,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.DOCKER_REGISTRY }}/${{ github.repository_owner }}/fabric-nodeenv tags: | @@ -78,7 +78,7 @@ jobs: - name: Build and push ${{ matrix.COMPONENT }} Image id: push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: platforms: linux/amd64,linux/arm64 file: docker/fabric-nodeenv/Dockerfile diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7b800b0d..df6218e7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,8 +14,8 @@ jobs: MINOR_PACKAGE_VERSION: ${{ steps.builddata.outputs.MINOR_PACKAGE_VERSION }} BUILD_DATE: ${{ steps.builddata.outputs.BUILD_DATE }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '18.x' - name: BuildData @@ -43,8 +43,8 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '18.x' - name: Install/Rebuild/UnitTest @@ -55,9 +55,9 @@ jobs: - name: Pre-process Artifacts run: | npx cobertura-merge -o merged_coverage.xml shim=./libraries/fabric-shim/coverage/cobertura-coverage.xml contractapi=./apis/fabric-contract-api/coverage/cobertura-coverage.xml -p - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 name: Upload test results - if: success() || failure() + if: ${{ !cancelled() }} with: name: TestResults path: ./**/test-results.xml @@ -68,13 +68,13 @@ jobs: node common/scripts/install-run-rush.js publish --include-all --pack --release-folder tgz --publish docker image save hyperledger/fabric-nodeenv | gzip > fabric-nodeenv.tar.gz - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 name: Binaries with: name: node-tgzs path: tgz/ - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 name: Docker with: name: nodeenv-docker-image @@ -84,16 +84,16 @@ jobs: runs-on: ubuntu-20.04 needs: build steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '18.x' - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: nodeenv-docker-image path: build/ - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: node-tgzs path: build/ @@ -121,28 +121,27 @@ jobs: node common/scripts/install-run-rush.js test:fv --verbose node common/scripts/install-run-rush.js test:e2e --verbose - - - uses: actions/upload-artifact@v3 - if: success() || failure() + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} name: TestLogs with: name: TestLogs - path: ./**/*.build.log + path: "**/*.build.log" - # Job to handle the auditing of the code - # NPM audit is run on a 'fake' installation of the libraries - # Pulling in all the dependencies it will be able to run NPM AUDIT, and if that returns a - # error code the job will fail. + # Job to handle the auditing of the code + # NPM audit is run on a 'fake' installation of the libraries + # Pulling in all the dependencies it will be able to run NPM AUDIT, and if that returns a + # error code the job will fail. src_audit: runs-on: ubuntu-20.04 needs: build steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '18.x' - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: node-tgzs path: build/