Skip to content

ci: fix broken CI builds on forked PRs - #134

Open
PoonHarpoon wants to merge 1 commit into
AppFuton:develfrom
PoonHarpoon:pr/ci-fork-comment
Open

PoonHarpoon wants to merge 1 commit into
AppFuton:develfrom
PoonHarpoon:pr/ci-fork-comment

Conversation

@PoonHarpoon

Copy link
Copy Markdown

This fixes successful builds that report "failed" because they couldn't create a comment, and therefore report a total failure.

GitHub gives pull_request runs from a fork a read-only GITHUB_TOKEN,
whatever the workflow asks for, so issues.createComment is refused and
the job is marked failed although the APK built and was uploaded.

The comment step now only runs for pull requests from branches in this repository, so fork PRs still build and upload the APK but skip the comment.

GitHub gives pull_request runs from a fork a read-only GITHUB_TOKEN,
whatever the workflow asks for, so issues.createComment is refused and
the job is marked failed although the APK built and was uploaded. Only
comment when the branch is in this repository (and not on manual
workflow_dispatch runs, which have no pull request to comment on).
@PoonHarpoon

Copy link
Copy Markdown
Author

Green mark, it works, keeps good builds from not passing checks; Once this is merged I have some some more PRs to land

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant