47
47
persist-credentials :false
48
48
fetch-depth :0
49
49
50
- # NOTE: Only required for local testing via nektos/act
51
- -name :Install gh CLI
52
- run :|
53
- sudo apt-get update -y && \
54
- sudo apt-get install -y gh && \
55
- gh auth login --with-token <<< "${{ secrets.TRAIAGE_GITHUB_TOKEN }}"
56
-
57
50
-name :Extract context key from issue
58
51
id :extract-context
59
52
env :
@@ -130,11 +123,11 @@ jobs:
130
123
id :create-archive
131
124
if :${{ inputs.persistence_mode == 'archive' }}
132
125
env :
133
- GCS_BUCKET :${{ secrets.TRAIAGE_DEST_GCS_BUCKET }}
126
+ DESTINATION_PREFIX :${{ secrets.TRAIAGE_DESTINATION_PREFIX }}
134
127
run :|
135
128
echo "Creating archive for workspace: $WORKSPACE_NAME"
136
- archive_url=$( ./scripts/traiage.sh archive)
137
- echo "archive_url=${archive_url} " >> "${GITHUB_OUTPUT}"
129
+ ./scripts/traiage.sh archive
130
+ echo "archive_url=${DESTINATION_PREFIX%%/}/$WORKSPACE_NAME.tar.gz " >> "${GITHUB_OUTPUT}"
138
131
139
132
-name :Report results
140
133
env :
@@ -152,7 +145,7 @@ jobs:
152
145
} >> "${GITHUB_STEP_SUMMARY}"
153
146
154
147
-name :Cleanup workspace
155
- if :always() && steps.create-workspace .outputs.workspace_name != ''
148
+ if :steps.create-workspace.outputs.workspace_name != '' && (inputs.persistence_mode == 'archive' && steps.create-archive .outputs.archive_url != '')
156
149
run :|
157
150
echo "Cleaning up workspace: $WORKSPACE_NAME"
158
151
./scripts/traiage.sh delete ||true