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

no matching workflow run found error in a complex scenario #251

Open
DawidNiezgodka opened this issue Sep 28, 2023 · 1 comment
Open

no matching workflow run found error in a complex scenario #251

DawidNiezgodka opened this issue Sep 28, 2023 · 1 comment

Comments

@DawidNiezgodka
Copy link

During the attempt to download a file that was created in a previous workflow, I get the error: no matching workflow run found.

Problem description:
Repository A uses workflow1.yml, which is located in repository B. workflow1.yml consists of three parts: workflow1a.yml, workflow1b.yml, and workflow1c.yml.
Among the steps taken by workflow1a.yml is uploading an artifact named ansible-inventory using action actions/upload-artifact@v3.
Workflow1b.yml uses the download action to download the artifact created during workflow1a.yml.
The whole process is triggered by a push to the b branch.

Despite many attempts to set up the actions, I keep getting no matching workflow run found. I was able to access the file only by removing the branch flag, but the file I then get is outdated.

First attempt:

        with:
            github_token: ${{ secrets.TOKEN }}
            workflow_conclusion: success
            event: push
            run_id: ${{ github.event.workflow_run.id }}
            name: ansible-inventory
            name_is_regexp: false
            path: ${{ inputs.cfg_path }}
            repo: ${{ github.repository }}
            branch: b 
            if_no_artifact_found: fail

Second attempt - add check_artifacts and search_artifacts:

        with:
            github_token: ${{ secrets.TOKEN }}
            workflow_conclusion: success
            event: push
            run_id: ${{ github.event.workflow_run.id }}
            name: ansible-inventory
            check_artifacts: true
            search_artifacts: true
            name_is_regexp: false
            path: ${{ inputs.cfg_path }}
            repo: ${{ github.repository }}
            branch: b 
            if_no_artifact_found: fail

Third attempt - refer to the workflow1a directly:

      - name: Download artifact
        id: download-artifact
        uses: dawidd6/action-download-artifact@v2
        with:
            github_token: ${{ secrets.TOKEN }}
            workflow: DawidNiezgodka/B/.github/workflows/workflow1a.yml@abc123
            event: push
            search_artifacts: true
            name: ansible-inventory
            name_is_regexp: false
            path: ${{ inputs.cfg_path }}
            repo: ${{ github.repository }} # Repo A
            branch: b
            if_no_artifact_found: fail
@feryardiant
Copy link

Come across same issue, here

feryardiant added a commit to creasico/laravel-project that referenced this issue Oct 13, 2023
see dawidd6/action-download-artifact#251

Signed-off-by: Fery Wardiyanto <ferywardiyanto@gmail.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

No branches or pull requests

2 participants