bonitasoft / bonita-documentation-site

The sources of the Bonita Documentation site
https://documentation.bonitasoft.com/
GNU General Public License v2.0
9 stars 5 forks source link

ci(surge-deploy): get artifact from the specific workflow run #744

Closed tbouffard closed 1 week ago

tbouffard commented 1 week ago

Previously, this wasn't set in dawidd6/action-download-artifact so the action was doing a search to retrieve the artifact. It was using default search parameters, so it skip workflow runs for PR from forks, and always considered the latest run of the workflow. So, when several PR was opened simultaneously, a wrong artifact could be retrieved.

In addition, don't run the deployment workflow if the build step failed. Fix the fix, the deployment would fail because no artifact is available for download.

Notes

Fixes #741 Validated with https://github.com/process-analytics/github-actions-playground/pull/363#issuecomment-2205176295

About the addition of a condition to run the workflow

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow

A workflow run is triggered regardless of the conclusion of the previous workflow. If you want to run a job or step based on the result of the triggering workflow, you can use a conditional with the github.event.workflow_run.conclusion property.

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

bonita-ci commented 1 week ago

šŸŽŠ PR Preview 02d75193a4c6f4f383226dd63435869e1bf71907 has been successfully built and deployed to https://bonitasoft-bonita-documentation-site-test-pr-744.surge.sh

šŸ• Build time: 0.01s

šŸ¤– By surge-preview

bonita-ci commented 1 week ago

šŸŽŠ PR Preview 02d75193a4c6f4f383226dd63435869e1bf71907 has been successfully built and deployed to https://bonitasoft-bonita-documentation-site-deploy-pr-744.surge.sh

šŸ• Build time: 0.009s

šŸ¤– By surge-preview