mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-18 07:55:10 +00:00
By default, Docker images are referenced from Docker Hub. This has now applied rate limiting that is causing builds to fail. Current Fabric v2.5 and chaincode container Docker images are also published to GitHub Container Registry, which does not impose rate limits and will be located closer to the GitHub Actions runners. This change: - Updates to latest Fabric component versions, which are available in GHCR. The Fabric install script defaults to GHCR as the Docker registry for versions that are available here. - Pulls and re-tags chaincode container images from GHCR in advance of running tests in the build. This avoids them being pulled from Docker Hub during test execution. Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
63 lines
2 KiB
YAML
63 lines
2 KiB
YAML
name: Set up Test Network Runner
|
|
description: Set up the Test Network Runtime
|
|
inputs:
|
|
go-version:
|
|
description: Version of go
|
|
default: "1.23"
|
|
node-version:
|
|
description: Version of node
|
|
default: 18.x
|
|
java-version:
|
|
description: Version of JDK
|
|
default: 11.x
|
|
fabric-version:
|
|
description: Version of Hyperledger Fabric
|
|
default: 2.5.11
|
|
ca-version:
|
|
description: Version of Hyperledger Fabric CA
|
|
default: 1.5.15
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ inputs.go-version }}
|
|
cache-dependency-path: "**/go.sum"
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ inputs.node-version }}
|
|
cache: "npm"
|
|
cache-dependency-path: "**/package-lock.json"
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: ${{ inputs.java-version }}
|
|
cache: gradle
|
|
|
|
- name: Install fabric CLI
|
|
shell: bash
|
|
run: |
|
|
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh \
|
|
| bash -s -- binary --fabric-version ${{ inputs.fabric-version }} --ca-version ${{ inputs.ca-version }}
|
|
echo ${PWD}/bin >> $GITHUB_PATH
|
|
|
|
- name: Pull Fabric Docker Images
|
|
shell: bash
|
|
run: |
|
|
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh \
|
|
| bash -s -- docker --fabric-version ${{ inputs.fabric-version }} --ca-version ${{ inputs.ca-version }}
|
|
|
|
- name: Pull chaincode container images
|
|
shell: bash
|
|
run: |
|
|
docker pull ghcr.io/hyperledger/fabric-nodeenv:2.5
|
|
docker tag ghcr.io/hyperledger/fabric-nodeenv:2.5 hyperledger/fabric-nodeenv:2.5
|
|
docker pull ghcr.io/hyperledger/fabric-javaenv:2.5
|
|
docker tag ghcr.io/hyperledger/fabric-javaenv:2.5 hyperledger/fabric-javaenv:2.5
|
|
|
|
- name: Install retry CLI
|
|
shell: bash
|
|
run: curl -sSL https://raw.githubusercontent.com/kadwanev/retry/master/retry -o ./bin/retry && chmod +x ./bin/retry
|