spdx / license-list-XML

This is the repository for the master files that comprise the SPDX License List
Other
355 stars 288 forks source link

Deploy job fails if two commits are pushed in short succession #2477

Closed Pandapip1 closed 6 months ago

Pandapip1 commented 6 months ago

See https://github.com/spdx/license-list-XML/actions/runs/9094142729

This can be easily solved by adding the following to the workflow:

concurrency: 
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
swinslow commented 6 months ago

Thank you @Pandapip1! This has been an issue for a while now, and I appreciate you taking the time to dig into the cause and finding a solution :)

Just to confirm (since I'm still a newbie for GitHub Actions) -- does this basically say, if we merge PR 1 and then PR 2 in quick succession while the actions for 1 are still running, it'll cancel 1 and continue with 2?

@goneall @zvr, any thoughts or concerns with the proposed solution here?

goneall commented 6 months ago

I'm also not much of a GitHub action workflow expert, but from looking at the referenced issue it is indeed caused by concurrent execution of git pushes and the proposed solution looks OK from what I know of the GitHub Actions.

Pandapip1 commented 6 months ago

Just to confirm (since I'm still a newbie for GitHub Actions) -- does this basically say, if we merge PR 1 and then PR 2 in quick succession while the actions for 1 are still running, it'll cancel 1 and continue with 2?

Yup!

swinslow commented 6 months ago

Thanks @Pandapip1! I've merged #2478. I'll likely be merging several PRs concurrently in the next few days as we get ready to push the 3.24 release, so I should get a chance to test this out in practice :) Thanks for putting this together for us!