Skip to content

Commit b0db280

Browse files
committed
ADFA-2602: Run the uploader from this workflow's own checkout, and mute Slack by default
The 9.6.1 runs wrote their zips to the bucket root instead of the versioned prefix, so the versioned URL 404'd while the run reported success. Cause: the workflow file comes from the dispatched ref, but the repository content -- scripts included -- comes from inputs.ref. Building the toolchain branch therefore ran that branch's cloudflare-r2-upload.py, which predates R2_BUCKET/R2_KEY_PREFIX and ignored both. The tell is that the modified script's 'to R2 <bucket>/<key>' line never appears in those logs. Check this workflow's own ref out to .workflow-tools and run the uploader from there, so the workflow no longer depends on the branch under build carrying its tooling. Slack is now behind notify_slack (default false): test runs were posting links to the team channel, and with the bug above those links were wrong. Claude-Session: https://claude.ai/code/session_017HGpMsUzZ5wxCfMtDZ2HGP
1 parent 4f873f0 commit b0db280

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/generate_assets.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ on:
2121
- site
2222
- candidate
2323
- release
24+
notify_slack:
25+
description: Post the download links to Slack
26+
required: false
27+
type: boolean
28+
default: false
2429
candidate_path:
2530
description: 'GreenGeeks candidate staging path (asset_source: candidate), e.g. tmp/assets/candidates/42'
2631
required: false
@@ -354,6 +359,12 @@ jobs:
354359
echo "ASSETS_PATH=$zip_path" >> $GITHUB_OUTPUT
355360
echo "$(du -h "$zip_path" | cut -f1) $zip_path"
356361
362+
- name: Checkout this workflow's tooling
363+
uses: actions/checkout@v4
364+
with:
365+
ref: ${{ github.ref }}
366+
path: .workflow-tools
367+
357368
- name: Install uv
358369
uses: astral-sh/setup-uv@v6
359370

@@ -366,10 +377,11 @@ jobs:
366377
R2_BUCKET: ${{ vars.R2_ASSETS_BUCKET || 'apk-repo' }}
367378
R2_KEY_PREFIX: assets/${{ steps.toolchain.outputs.GRADLE_VERSION }}/
368379
run: |
369-
uv run --with boto3 scripts/cloudflare-r2-upload.py "${{ steps.assets_zip.outputs.ASSETS_PATH }}"
380+
uv run --with boto3 .workflow-tools/scripts/cloudflare-r2-upload.py "${{ steps.assets_zip.outputs.ASSETS_PATH }}"
370381
echo "DOWNLOAD_URL=https://download.appdevforall.org/assets/${{ steps.toolchain.outputs.GRADLE_VERSION }}/assets-${{ matrix.arch }}.zip" >> $GITHUB_OUTPUT
371382
372383
- name: Send Slack notification
384+
if: inputs.notify_slack
373385
env:
374386
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
375387
ASSET_LABEL: ${{ matrix.label }}

0 commit comments

Comments
 (0)