Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add secrets so we can download across workflows #3746

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

zachaller
Copy link
Collaborator

@zachaller zachaller commented Jul 24, 2024

This used to be done like this:

steps:
- name: Download and Extract Artifacts
# TODO repace with native actions/download-artifact once it supports downloading from another workflow: https://github.com/actions/download-artifact/issues/3
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mkdir -p artifacts && cd artifacts
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
do
IFS=$'\t' read name url <<< "$artifact"
gh api $url > "$name.zip"
unzip -d "$name" "$name.zip"
done

Changed the code to use the action provided by github which is the suggested way. Docs on required permission: https://github.com/actions/download-artifact#download-artifacts-from-other-workflow-runs-or-repositories

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
Copy link

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.16%. Comparing base (9884b2a) to head (2c6653a).
Report is 69 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3746   +/-   ##
=======================================
  Coverage   78.16%   78.16%           
=======================================
  Files         157      157           
  Lines       22501    22501           
=======================================
  Hits        17588    17588           
  Misses       3999     3999           
  Partials      914      914           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@leoluz leoluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zachaller zachaller merged commit d3d630d into argoproj:master Jul 24, 2024
26 checks passed
nikoshet pushed a commit to nikoshet/argo-rollouts that referenced this pull request Jul 25, 2024
add secrets so we can download across workflows

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants