theupdateframework/tuf-on-ci

feature: Add GitHub task summaries

Closed this issue · 1 comments

jku commented

It would be useful to do the most useful logging into step summaries: This is markdown GH renders on the workflow run page and is pretty easy to produce:

echo "### Online signing was skipped as unnecessary" >> $GITHUB_STEP_SUMMARY

As part of this task I'll intend to fix this error which happens if there is concurrent updates to the even branch during the execution of the signing-event.yml workflow:

Signers can sign these changes by running tuf-on-ci-sign sign/<event-name>
Git output on error: To https://github.com/<org>/<repo>
! [rejected] sign/<event-name> -> sign/<event-name> (fetch first)
error: failed to push some refs to 'https://github.com/<org>/<repo>'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

My plan for fixing this is to catch the error and detect that there are updates on remote, and so there is nothing to be done, as any changes that would be done (e.g. update targets.json to reflect changes to the targets) may be wrong (remote can contain new changes) and as there are changes, a new action would be triggered that would reconcile the state.

cc: @jku