Skip to content

Commit b04b10a

Browse files
committed
8341861: GHA: Use only retention mechanism to remove bundles
Reviewed-by: simonis Backport-of: 29ae26517f9c1fd5e641b3a560aa93e370920506
1 parent 26746a9 commit b04b10a

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -325,46 +325,3 @@ jobs:
325325
bootjdk-platform: windows-x64
326326
runs-on: windows-2025
327327

328-
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
329-
remove-bundles:
330-
name: 'Remove bundle artifacts'
331-
runs-on: ubuntu-22.04
332-
if: always()
333-
needs:
334-
- build-linux-x64
335-
- build-linux-x86-hs
336-
- build-linux-x64-hs-nopch
337-
- build-linux-x64-hs-zero
338-
- build-linux-x64-hs-minimal
339-
- build-linux-x64-hs-optimized
340-
- build-linux-cross-compile
341-
- build-macos-x64
342-
- build-macos-aarch64
343-
- build-windows-x64
344-
- build-windows-aarch64
345-
- test-linux-x64
346-
- test-macos-x64
347-
- test-macos-aarch64
348-
- test-windows-x64
349-
350-
steps:
351-
- name: 'Remove bundle artifacts'
352-
run: |
353-
# Find and remove all bundle artifacts
354-
# See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28
355-
ALL_ARTIFACT_IDS="$(curl -sL \
356-
-H 'Accept: application/vnd.github+json' \
357-
-H 'Authorization: Bearer ${{ github.token }}' \
358-
-H 'X-GitHub-Api-Version: 2022-11-28' \
359-
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')"
360-
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')"
361-
for id in $BUNDLE_ARTIFACT_IDS; do
362-
echo "Removing $id"
363-
curl -sL \
364-
-X DELETE \
365-
-H 'Accept: application/vnd.github+json' \
366-
-H 'Authorization: Bearer ${{ github.token }}' \
367-
-H 'X-GitHub-Api-Version: 2022-11-28' \
368-
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \
369-
|| echo "Failed to remove bundle"
370-
done

0 commit comments

Comments
 (0)