9
9
- " v2.*"
10
10
workflow_dispatch :
11
11
12
- env :
13
- DOCKER_REGISTRY : ${{ github.repository_owner == 'hyperledger' && 'docker.io' || 'ghcr.io' }}
14
-
15
12
jobs :
16
13
test :
17
14
uses : ./.github/workflows/test.yaml
18
15
19
16
publishnpm :
20
- runs-on : ubuntu-20 .04
17
+ runs-on : ubuntu-24 .04
21
18
needs : test
22
19
steps :
23
20
- uses : actions/setup-node@v4
24
21
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"
27
24
- uses : actions/download-artifact@v4
28
25
with :
29
26
name : node-tgzs
@@ -37,43 +34,45 @@ jobs:
37
34
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38
35
39
36
publishdocker :
40
- runs-on : ubuntu-20.04
37
+ runs-on : ubuntu-latest
41
38
needs : test
42
39
permissions :
43
40
contents : read
44
41
packages : write
45
-
42
+ strategy :
43
+ fail-fast : false
44
+ matrix :
45
+ DOCKER_REGISTRY :
46
+ - " docker.io"
47
+ - " ghcr.io"
46
48
steps :
47
49
- name : Set up QEMU
48
50
uses : docker/setup-qemu-action@v3
49
51
- name : Set up Docker Buildx
50
52
uses : docker/setup-buildx-action@v3
51
53
with :
52
54
buildkitd-flags : --debug
53
- config-inline : |
55
+ buildkitd- config-inline : |
54
56
[worker.oci]
55
57
max-parallelism = 1
56
58
- name : Checkout
57
59
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
60
61
uses : docker/login-action@v3
61
62
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 }}
66
66
- name : Docker meta
67
67
id : meta
68
68
uses : docker/metadata-action@v5
69
69
with :
70
- images : ${{ env .DOCKER_REGISTRY }}/${{ github.repository_owner }}/fabric-nodeenv
70
+ images : ${{ matrix .DOCKER_REGISTRY }}/${{ github.repository_owner }}/fabric-nodeenv
71
71
tags : |
72
72
type=semver,pattern={{version}}
73
73
type=semver,pattern={{major}}.{{minor}}
74
74
type=semver,pattern={{major}}.{{minor}}.{{patch}}
75
-
76
- - name : Build and push ${{ matrix.COMPONENT }} Image
75
+ - name : Build and push image
77
76
id : push
78
77
uses : docker/build-push-action@v5
79
78
with :
0 commit comments