Re: [LTP] [PATCH v2 1/1] ci: Add hook to mirror docparse to homepage

Petr Vorel
2022-12-09T21:17:57Z

Hi,

...
> + printf "metadata.nightly.html: Update to $commit\n\nUpdate metadata.nightly.html to $commit_desc\n" > /tmp/msg
> + git commit -F /tmp/msg .
> +
> + echo "::notice::GH_PERSONAL_ACCESS_TOKEN: $GH_PERSONAL_ACCESS_TOKEN"
> + git push https://${GH_PERSONAL_ACCESS_TOKEN}@github.com/linux-test-project/linux-test-project.github.com.git
I'll also add here:
echo "::notice::pushed $commit_desc"

So that it's obvious in github actions that commit was pushed.

Because github action does not allow to add exit code for "cancel"
- any non-zero exit code means failure:
https://docs.github.com/en/actions/creating-actions/setting-exit-codes-for-actions

"skip" due if: (e.g. if: ${{ github.repository == 'linux-test-project/ltp' }})
would allow it, but we have no way to exit like this.

Thus even nothing is pushed the result is always "green".