1- name : ' Meteor Docker'
1+ name : ' Build Docker'
22
33inputs :
44 CR_USER :
55 required : true
66 CR_PAT :
77 required : true
8- node-version :
9- required : true
10- description : ' Node version'
11- type : string
128 deno-version :
139 required : true
1410 description : ' Deno version'
@@ -25,13 +21,10 @@ inputs:
2521 required : false
2622 description : ' Publish image'
2723 default : ' true'
28- setup :
29- required : false
30- description : ' Setup node.js'
31- default : ' true'
32- NPM_TOKEN :
24+ setup-docker :
3325 required : false
34- description : ' NPM token'
26+ description : ' Setup Docker'
27+ default : true
3528 type :
3629 required : false
3730 description : ' production or coverage'
4942 username : ${{ inputs.CR_USER }}
5043 password : ${{ inputs.CR_PAT }}
5144
52- - name : Restore packages build
53- uses : actions/download-artifact@v6
54- with :
55- name : packages-build
56- path : /tmp
57-
58- - name : Unpack packages build
59- shell : bash
60- run : |
61- tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .
62-
6345 - name : Restore meteor build
6446 if : inputs.service == 'rocketchat'
6547 uses : actions/download-artifact@v6
@@ -76,20 +58,17 @@ runs:
7658 rm Rocket.Chat.tar.gz
7759
7860 - name : Set up Docker
61+ if : inputs.setup-docker == true
7962 uses : docker/setup-docker-action@v4
8063 with :
8164 daemon-config : |
8265 {
83- "debug": true ,
66+ "debug": false ,
8467 "features": {
8568 "containerd-snapshotter": true
8669 }
8770 }
8871
89- - uses : docker/setup-buildx-action@v3
90- with :
91- buildkitd-flags : --oci-worker-gc --oci-worker-gc-keepstorage=4000
92-
9372 - name : Build Docker images
9473 shell : bash
9574 run : |
@@ -122,10 +101,12 @@ runs:
122101 echo "Contents of /tmp/meta.json:"
123102 cat /tmp/meta.json
124103
125- mkdir -p /tmp/digests/${{ inputs.service }}${{ inputs.type == 'coverage' && '-cov' || '' }}/${{ inputs.arch }}
104+ SERVICE_SUFFIX=${{ inputs.service == 'rocketchat' && inputs.type == 'coverage' && (github.event_name == 'release' || github.ref == 'refs/heads/develop') && '-cov' || '' }}
105+
106+ mkdir -p /tmp/digests/${{ inputs.service }}${SERVICE_SUFFIX}/${{ inputs.arch }}
126107 DIGEST=$(jq -r '.["${{ inputs.service }}"].["containerimage.digest"]' "/tmp/meta.json")
127108 IMAGE_NO_TAG=$(echo "$IMAGE" | sed 's/:.*$//')
128- echo "${IMAGE_NO_TAG}@${DIGEST}" > "/tmp/digests/${{ inputs.service }}${{ inputs.type == 'coverage' && '-cov' || '' } }/${{ inputs.arch }}/digest.txt"
109+ echo "${IMAGE_NO_TAG}@${DIGEST}" > "/tmp/digests/${{ inputs.service }}${SERVICE_SUFFIX }/${{ inputs.arch }}/digest.txt"
129110
130111 - uses : actions/upload-artifact@v4
131112 if : inputs.publish-image == 'true'
0 commit comments