99 - " v2.*"
1010 workflow_dispatch :
1111
12- env :
13- DOCKER_REGISTRY : ${{ github.repository_owner == 'hyperledger' && 'docker.io' || 'ghcr.io' }}
14-
1512jobs :
1613 test :
1714 uses : ./.github/workflows/test.yaml
1815
1916 publishnpm :
20- runs-on : ubuntu-20 .04
17+ runs-on : ubuntu-24 .04
2118 needs : test
2219 steps :
2320 - uses : actions/setup-node@v4
2421 with :
25- node-version : ' 18.x'
26- registry-url : ' https://registry.npmjs.org'
22+ node-version : " 18.x"
23+ registry-url : " https://registry.npmjs.org"
2724 - uses : actions/download-artifact@v4
2825 with :
2926 name : node-tgzs
@@ -37,43 +34,45 @@ jobs:
3734 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3835
3936 publishdocker :
40- runs-on : ubuntu-20.04
37+ runs-on : ubuntu-latest
4138 needs : test
4239 permissions :
4340 contents : read
4441 packages : write
45-
42+ strategy :
43+ fail-fast : false
44+ matrix :
45+ DOCKER_REGISTRY :
46+ - " docker.io"
47+ - " ghcr.io"
4648 steps :
4749 - name : Set up QEMU
4850 uses : docker/setup-qemu-action@v3
4951 - name : Set up Docker Buildx
5052 uses : docker/setup-buildx-action@v3
5153 with :
5254 buildkitd-flags : --debug
53- config-inline : |
55+ buildkitd- config-inline : |
5456 [worker.oci]
5557 max-parallelism = 1
5658 - name : Checkout
5759 uses : actions/checkout@v4
58-
59- - name : Login to the ${{ env.DOCKER_REGISTRY }} Container Registry
60+ - name : Login to the ${{ matrix.DOCKER_REGISTRY }} Container Registry
6061 uses : docker/login-action@v3
6162 with :
62- registry : ${{ env.DOCKER_REGISTRY }}
63- username : ${{ env.DOCKER_REGISTRY == 'docker.io' && secrets.DOCKERHUB_USERNAME || github.actor }}
64- password : ${{ env.DOCKER_REGISTRY == 'docker.io' && secrets.DOCKERHUB_TOKEN || secrets.GITHUB_TOKEN }}
65-
63+ registry : ${{ matrix.DOCKER_REGISTRY }}
64+ username : ${{ matrix.DOCKER_REGISTRY == 'docker.io' && secrets.DOCKERHUB_USERNAME || github.actor }}
65+ password : ${{ matrix.DOCKER_REGISTRY == 'docker.io' && secrets.DOCKERHUB_TOKEN || secrets.GITHUB_TOKEN }}
6666 - name : Docker meta
6767 id : meta
6868 uses : docker/metadata-action@v5
6969 with :
70- images : ${{ env .DOCKER_REGISTRY }}/${{ github.repository_owner }}/fabric-nodeenv
70+ images : ${{ matrix .DOCKER_REGISTRY }}/${{ github.repository_owner }}/fabric-nodeenv
7171 tags : |
7272 type=semver,pattern={{version}}
7373 type=semver,pattern={{major}}.{{minor}}
7474 type=semver,pattern={{major}}.{{minor}}.{{patch}}
75-
76- - name : Build and push ${{ matrix.COMPONENT }} Image
75+ - name : Build and push image
7776 id : push
7877 uses : docker/build-push-action@v5
7978 with :
0 commit comments