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

bug: forks seems to break download-artifacts #167

Open
laurentsenta opened this issue Sep 18, 2023 · 2 comments
Open

bug: forks seems to break download-artifacts #167

laurentsenta opened this issue Sep 18, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@laurentsenta
Copy link
Contributor

Code used to download artifacts from other repos:

steps:
- name: get repo details
id: get-details
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER_AND_REPO: ${{ matrix.target }}
run: |
DETAILS=$(gh api repos/${OWNER_AND_REPO})
DEFAULT_BRANCH=$(echo $DETAILS | jq -r '.default_branch')
echo "default-branch=${DEFAULT_BRANCH}" >> $GITHUB_OUTPUT
NAME=$(echo $DETAILS | jq -r '.name')
echo "name=${NAME}" >> $GITHUB_OUTPUT
- name: Download json output
id: download-artifact
uses: dawidd6/action-download-artifact@v2 # TODO: pin
with:
workflow: gateway-conformance.yml
workflow_conclusion: "completed" # TODO: ideally we could request success|failure (https://github.com/dawidd6/action-download-artifact#usage)
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.get-details.outputs.default-branch }}
name: gateway-conformance.json
repo: ${{ matrix.target }}
if_no_artifact_found: fail

Action failed:
https://github.com/ipfs/gateway-conformance/actions/runs/6218823800/job/16875980114

Run dawidd6/action-download-artifact@v2
==> Repository: ipfs/kubo
==> Artifact name: gateway-conformance.json
==> Local path: ./
==> Workflow name: gateway-conformance.yml
==> Workflow conclusion: completed
==> Branch: master
==> (found) Run ID: 62[1](https://github.com/ipfs/gateway-conformance/actions/runs/6218823800/job/16875980114#step:3:1)0849710
==> (found) Run date: 2023-09-[17](https://github.com/ipfs/gateway-conformance/actions/runs/6218823800/job/16875980114#step:3:18)T01:42:28Z
==> (not found) Artifact: gateway-conformance.json
==> Found the following artifacts instead:
Error: no artifacts found

When I open the run_id:
https://github.com/ipfs/kubo/actions/runs/6210849710
That looks like the master branch from a fork.

@laurentsenta laurentsenta added the bug Something isn't working label Sep 18, 2023
@laurentsenta laurentsenta self-assigned this Sep 18, 2023
@laurentsenta
Copy link
Contributor Author

(fixing this now, I'd like to make a demo this evening)

@laurentsenta
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant