File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 27
27
- name : Get list of remote branches and their hashes
28
28
id : get-branches
29
29
run : |
30
+ set -x
30
31
git clone --no-checkout "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" .
31
32
git fetch --all
32
33
branches="$(git for-each-ref --format='{"name":"%(refname:short)","hash":"%(objectname)"}' refs/remotes/origin/ | sed 's|origin/||' | jq -sc 'map(select(.name != "origin"))')"
57
58
id : check_dir
58
59
run : |
59
60
if [ -d "puck-ntag215-manager" ]; then
60
- echo "exists=true" >> $GITHUB_OUTPUT
61
+ echo "exists=true" | tee " $GITHUB_OUTPUT"
61
62
else
62
- echo "exists=false" >> $GITHUB_OUTPUT
63
+ echo "exists=false" | tee " $GITHUB_OUTPUT"
63
64
fi
64
65
65
66
- name : Use Node.js
69
70
- name : Build web app
70
71
if : ${{ steps.check_dir.outputs.exists == 'true' }}
71
72
run : |
72
- [ -d "puck-ntag215-manager" ]
73
+ set -x
73
74
cd puck-ntag215-manager
74
75
npm install --no-optional
75
76
npm run build
@@ -109,16 +110,21 @@ jobs:
109
110
branches : ${{ needs.build.outputs.branches }}
110
111
111
112
run : |
112
- mkdir -p "dist/"
113
+ set -x
114
+
113
115
echo "$branches" | jq -c '.[]' | while read -r branch; do
114
116
name="$(echo "$branch" | jq -r '.name')"
115
117
hash="$(echo "$branch" | jq -r '.hash')"
116
118
119
+ echo "Working on branch $name — $hash"
120
+
117
121
if [ ! -d "./artifacts/$hash" ]; then
122
+ echo "Artifact not found for $hash, skipping"
118
123
continue
119
124
fi
120
125
121
126
if [ "$name" == "master" ]; then
127
+ mkdir -p "dist/"
122
128
(cd "./artifacts/$hash" && mv * "../../dist/")
123
129
else
124
130
mkdir -p "dist/$name"
You can’t perform that action at this time.
0 commit comments