-
Notifications
You must be signed in to change notification settings - Fork 213
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
Artifact created in the same workflow not found #316
Comments
Can't help if you don't show us your workflows. |
These are the main steps: jobs:
terraform:
runs-on: codebuild-gha-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Find current PR
uses: jwalton/gh-find-current-pr@master
id: find_pr
with:
state: all
- name: Download workers artifact from current PR
uses: dawidd6/action-download-artifact@v6
with:
name: cloudflare-workers-${{ env.PR_NUMBER || 'manual' }}
path: worker/dist/
env:
PR_NUMBER: ${{ steps.find_pr.outputs.pr }} The issue at hand is a common one: I want to retrieve an artifact associated with the PR that was merged into the default branch ( In essence, this workflow is triggered on both |
Umm, setting |
Why? Shouldn't it look for an artifact with matching name in current repository?
The PR has multiple artifacts. How does it know which one to download? Also, is your action smart enough to find out which was the last PR merged into the default branch ( |
Probably not smart enough for your use case. Maybe you've build the artifact on a fork? |
My use case is a classic Terraform workflow. Workflow Overview
This solution is implemented by the DevSecTop/TF-via-PR action. Custom Workflow RequirementIn my workflow, an additional step builds Cloudflare Workers, generating an artifact that is then passed to a Terraform module as an input. After the PR is approved and merged, there's no need to rebuild the Cloudflare Workers. Instead, we want to:
This approach optimizes the workflow by reusing the approved artifact, similar to how the |
Try |
The text was updated successfully, but these errors were encountered: