apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.64k stars 844 forks source link

Add PR number to dev build artifact #7765

Closed mbien closed 1 week ago

mbien commented 1 week ago

@ebarboni had the idea for that - makes it easier to distinguish the artifacts once downloaded

will use github.run_id when run without PR context

going to update the downloader script too assuming this works

mbien commented 1 week ago

If I remember correctly we currently don't have actions that run independently of PRs, but what happens when github.event.pullrequest is not set then? Will it blow or just result in the name dev-build?

right. The dev-build step is currently only label-activated, this would mean that the code path would only run with PR context.

I could try something like this though to cover the "what if" scenario: dev-build_${{github.event.pull_request.number || github.run_id}}

mbien commented 1 week ago

tested in a private repo and it works, github.run_id is a long UID and shouldn't collide with PR numbers - which makes it a good fallback I think.

can be also used to get back to the workflow run again:

https://github.com/apache/netbeans/actions/runs/<number>
mbien commented 1 week ago

merged since there was an opportunity to test this on the contributed jboss PR