fabric-samples/.github/actions/fsat-setup/action.yaml
Mark S. Lewis aa0c9d3004
Pull Fabric images from GitHub Container Registry (#1307)
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>
2025-02-23 10:53:41 -05:00

53 lines
1.7 KiB
YAML

name: Set up the Full Stack Asset Transfer Guide Dependencies
description: Set up the Full Stack Asset Transfer Guide Dependencies
inputs:
node-version:
description: Version of node
default: 18.x
just-version:
description: Just Version
default: "1.24.0"
k9s-version:
description: k9s Version
default: v0.25.3
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-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Install k9s
shell: bash
run: |
curl --fail --silent --show-error -L https://github.com/derailed/k9s/releases/download/${{ inputs.k9s-version }}/k9s_Linux_x86_64.tar.gz -o /tmp/k9s_Linux_x86_64.tar.gz
tar -zxf /tmp/k9s_Linux_x86_64.tar.gz -C /usr/local/bin k9s
sudo chown root /usr/local/bin/k9s
sudo chmod 755 /usr/local/bin/k9s
- name: Install just
uses: taiki-e/install-action@v2
with:
tool: just@${{ inputs.just-version }}
- name: Install weft
shell: bash
run: |
npm install -g @hyperledger-labs/weft
- name: Install fabric CLI
shell: bash
working-directory: full-stack-asset-transfer-guide
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