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

Workflow Run Referenced an Incorrect Artifact #265

Open
robronayne opened this issue Dec 26, 2023 · 3 comments
Open

Workflow Run Referenced an Incorrect Artifact #265

robronayne opened this issue Dec 26, 2023 · 3 comments

Comments

@robronayne
Copy link

I am using this GitHub Action in one of my workflows in order to retrieve and execute SQL scripts that were created during a previous job. However, I noticed that in one scenario of using this action, it retrieved the wrong GitHub artifact.

With the parameters that I used in my workflow, the action should only retrieve the artifacts that are associated with the current PR.

- name: Download Resource Deployment Scripts
        id: download-artifact
        uses: dawidd6/action-download-artifact@v2
        with:
          workflow_conclusion: success
          pr: ${{github.event.pull_request.number}}
          name: sql-script
          check_artifacts: false
          if_no_artifact_found: fail

However, during one of its runs on PR #941 it appears to have retrieved an artifact that was associated with PR #956.

This is the workflow run from PR #941 that retrieved the incorrect artifact. The artifact it retrieved was 1057981208.

Screenshot 2023-12-26 at 3 23 38 PM

This is the artifact where it originally appears, as attached to a workflow related to a separate PR.

Screenshot 2023-12-26 at 3 22 24 PM

I will also be reaching out to GitHub directly to see if there is any more information that I can relay back to you.

@dawidd6
Copy link
Owner

dawidd6 commented Dec 27, 2023

You specify the pr input, so in the action output you should have PR number and it's latest commit hash printed, but you don't. My wild guess is that ${{github.event.pull_request.number}} somehow evaluated to null or empty string.

@robronayne
Copy link
Author

Thank you for the response. I'll check with GitHub support to see if that is actually what happened.

@dawidd6
Copy link
Owner

dawidd6 commented Mar 16, 2024

Any luck? Can we close this issue?

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

No branches or pull requests

2 participants