ci: upload gh-aw binary from build job as artifact with download instructions#21440
ci: upload gh-aw binary from build job as artifact with download instructions#21440
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot add a step that writes to the step summary how to use the command line to download the binary using gh cli or curl / bash. |
… curl Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added a "Report binary download instructions" step (cab85d9) that writes to the job summary after the upload with both options: GitHub CLI: gh run download <run-id> --repo <repo> --name gh-aw-linux-amd64
chmod +x gh-awcurl: ARTIFACT_ID=$(curl -fsSL -H "Authorization: ******" \
"https://api.github.com/repos/<repo>/actions/runs/<run-id>/artifacts" \
| jq -r '.artifacts[] | select(.name=="gh-aw-linux-amd64") | .id')
curl -fsSL -H "Authorization: ******" \
-L "https://api.github.com/repos/<repo>/actions/artifacts/$ARTIFACT_ID/zip" \
-o gh-aw-linux-amd64.zip
unzip gh-aw-linux-amd64.zip && chmod +x gh-awThe run ID and repo are interpolated automatically from |
There was a problem hiding this comment.
Pull request overview
Updates CI to make the gh-aw build output easier to consume by uploading the compiled binary as an artifact and documenting retrieval steps directly in the workflow run summary.
Changes:
- Upload the Linux
gh-awbinary from thebuildjob as a GitHub Actions artifact. - Add a step that writes artifact download instructions (GitHub CLI + curl) to
$GITHUB_STEP_SUMMARY.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| echo "# Requires a GitHub token with actions:read scope" >> $GITHUB_STEP_SUMMARY | ||
| echo "ARTIFACT_ID=\$(curl -fsSL -H \"Authorization: Bearer \$GH_TOKEN\" \\" >> $GITHUB_STEP_SUMMARY | ||
| echo " \"https://api.github.com/repos/${REPO}/actions/runs/${RUN_ID}/artifacts\" \\" >> $GITHUB_STEP_SUMMARY | ||
| echo " | jq -r '.artifacts[] | select(.name==\"gh-aw-linux-amd64\") | .id')" >> $GITHUB_STEP_SUMMARY | ||
| echo "curl -fsSL -H \"Authorization: Bearer \$GH_TOKEN\" \\" >> $GITHUB_STEP_SUMMARY | ||
| echo " -L \"https://api.github.com/repos/${REPO}/actions/artifacts/\$ARTIFACT_ID/zip\" \\" >> $GITHUB_STEP_SUMMARY | ||
| echo " -o gh-aw-linux-amd64.zip" >> $GITHUB_STEP_SUMMARY | ||
| echo "unzip gh-aw-linux-amd64.zip && chmod +x gh-aw" >> $GITHUB_STEP_SUMMARY |
The
buildjob inci.ymluploads the compiledgh-awbinary as a GitHub Actions artifact and writes download instructions to the job step summary.Changes
After
make build, the binary is uploaded via:A subsequent step writes download instructions to
$GITHUB_STEP_SUMMARYshowing how to retrieve the artifact using either the GitHub CLI orcurl:GitHub CLI:
curl:
The run ID and repository are automatically interpolated from
github.run_idandgithub.repository.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.