devkanro / setup-statusfy

Manage your statusfy page by GitHub issues and actions
MIT License
4 stars 0 forks source link

Build error with simultaneous issues opening #2

Open theoricher opened 3 years ago

theoricher commented 3 years ago

Hello,

Thanks for your work :)

I have a problem with the workflow. If several issues are opened at the same time the "Statusfy Incident" build fails. In the logs I find the following error :

2021-07-07T12:16:47.6112362Z ##[group]✏️ Generating incident from #29...
2021-07-07T12:16:47.8319207Z Label 'severity: major-outage, system: mirrorsnl' detected.
2021-07-07T12:16:48.0378682Z Write incident file to 'content/2021-07-07_issue-29.md'.
2021-07-07T12:16:48.0387718Z ##[endgroup]
2021-07-07T12:16:48.0572289Z ##[group]🍴 Create commit by 'theoricher <theoricher@users.noreply.github.com>'.
2021-07-07T12:16:48.0696056Z Commit 'HEAD 7d27a0e' created.
2021-07-07T12:16:48.0699114Z Push 'HEAD 7d27a0e' to 'HEAD:refs/heads/main' on '***github.com/SysCorner/status.syscorner.com.git'.
2021-07-07T12:16:48.4095031Z ##[error]Error: Pushing to https://github.com/SysCorner/status.syscorner.com.git
error: failed to push some refs to 'https://github.com/SysCorner/status.syscorner.com.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I think we should add a git pull to get the changes from the build generated just before. But I don't know how to do it :) Can you help me correct this problem? I continue to search on my side :)

Thanks ! Théo

devkanro commented 3 years ago

The remote be set as https://github.com/devkanro/setup-statusfy and this is not a valid git URL, it should be https://github.com/devkanro/setup-statusfy.git.

If we want to use pull or rebase command, we need to set a valid git remote, then we can fetch, rebase and push.

I am focusing on building a GRPC Proxy tool, I will try it later.

theoricher commented 3 years ago

I need to edit this file for add pull ? https://github.com/devkanro/setup-statusfy/blob/v1/src/main.ts

devkanro commented 3 years ago

Yes, push action at https://github.com/devkanro/setup-statusfy/blob/v1/src/main.ts#L56

Recommend use fetch, rebase and push, but not pull and push.