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

Download artifacts for tag #245

Open
jvyden opened this issue Aug 14, 2023 · 1 comment
Open

Download artifacts for tag #245

jvyden opened this issue Aug 14, 2023 · 1 comment

Comments

@jvyden
Copy link

jvyden commented Aug 14, 2023

We have two workflows, one for building and one for releasing built artifacts upon a tag release. They're both summoned from one push event, and the release job waits for the other job:

      - name: Wait for builds
        uses: lewagon/wait-on-check-action@v1.3.1
        with:
          ref: ${{ github.ref }}
          check-name: 'Build, Test, and Upload Builds'
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          wait-interval: 10
      - name: Download artifacts
        id: download-artifact
        uses: dawidd6/action-download-artifact@v2
        with:
          github_token: ${{secrets.GITHUB_TOKEN}}
          branch: main
          workflow: dotnet.yml
          workflow_conclusion: success
          if_no_artifact_found: fail
          skip_unpack: true

For some reason, downloading the artifact downloads one from a previous push to master instead of downloading from the job we just waited for. I suspect this is because the commit SHAs match. It would be nice if I could specify the tag, so this workflow only considers workflows for that tag.

P.S: Sorry if this issue doesn't make sense, I'm tired 🙃

@dawidd6
Copy link
Owner

dawidd6 commented Mar 16, 2024

I think you have at least two options here:

  1. Submit a PR adding tag input.
  2. Get commit hash for your tag before calling the action in your workflow.

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