@@ -5,49 +5,33 @@ inputs:
55 description : The path to the docker directory
66 required : false
77 default : docker
8- app-artifact-pattern :
9- description : The glob pattern of the name of the uploaded app artifact (could be 'app-artifact-build' or 'app-artifact-release')
10- required : false
11- default : app-artifact*
128runs :
139 using : composite
1410 steps :
1511 - id : setup-qemu
1612 uses : docker/setup-qemu-action@v3
1713 - id : setup-buildx
1814 uses : docker/setup-buildx-action@v3
19- - id : setup-app-artifact
20- uses : actions/download-artifact@v4
15+ - id : setup-fs
16+ shell : bash
17+ run : mkdir -p "${{ inputs.docker-path }}/rootfs/opt/"
18+ - id : setup-release-app-artifact
19+ uses : actions/download-artifact@v5
20+ continue-on-error : true
21+ with :
22+ name : app-artifact-release
23+ path : ${{ inputs.docker-path }}/rootfs/opt/
24+ - id : setup-build-app-artifact
25+ if : steps.setup-release-app-artifact.outcome == 'failure'
26+ uses : actions/download-artifact@v5
2127 with :
22- pattern : ${{ inputs. app-artifact-pattern }}
23- path : ${{ inputs.docker-path }}
24- - id : select -app-artifact
28+ name : app-artifact-build
29+ path : ${{ inputs.docker-path }}/rootfs/opt/
30+ - id : validate -app-artifact
2531 shell : bash
2632 run : |
2733 tree -a "${{ inputs.docker-path }}/"
28- if [ -d "${{ inputs.docker-path }}/app-artifact-release" ]; then
29- ARTIFACT_DIR="${{ inputs.docker-path }}/app-artifact-release"
30- elif [ -d "${{ inputs.docker-path }}/app-artifact-build" ]; then
31- ARTIFACT_DIR="${{ inputs.docker-path }}/app-artifact-build"
32- else
33- echo "Unable to find artifact!"
34- exit 1
35- fi
36-
37-
38- ARTIFACT="$ARTIFACT_DIR/npm-pack.tgz"
39- echo "Found artifact $ARTIFACT"
40-
41- if [ ! -f "$ARTIFACT" ]; then
42- echo "Artifact is not file!"
43- exit 1
44- fi
45-
46- ARTIFACT_TARGET_PATH="${{ inputs.docker-path }}/rootfs/opt/"
47- mkdir -p "$ARTIFACT_TARGET_PATH"
48-
49- echo "Moving $ARTIFACT to $ARTIFACT_TARGET_PATH"
50- mv "$ARTIFACT" "$ARTIFACT_TARGET_PATH"
34+ tar -xOf ${{ inputs.docker-path }}/rootfs/opt/npm-pack.tgz package/package.json
5135 - id : build-rootfs
5236 shell : bash
5337 run : tar -C ${{ inputs.docker-path }}/rootfs -czf ${{ inputs.docker-path }}/rootfs.tar.gz ./
0 commit comments