Skip to content

Commit

Permalink
fixup! readme: Add an example workflow that pushes to a fork This req…
Browse files Browse the repository at this point in the history
…uires some non-obvious configuration to work correctly, so this seems suitable here. Originally I had thought to keep only one actual copy pastable workflow, but since some options like persist-credentials: false strictly only belong in the fork repository workflow, I thought it was more helpful to keep 2 workflows so each use case can copy paste easily.
  • Loading branch information
vchernin committed Aug 5, 2022
1 parent 538195c commit 11cb17e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Expand Up @@ -120,7 +120,7 @@ jobs:
args: --update --never-fork $PATH_TO_MANIFEST # e.g. com.organization.myapp.json
```

This second workflow has the tool push updates to a fork of your repository. This may be preferred if you do not want the tool to have direct push access to the canonical repsoitory.
This second workflow has the tool push updates to a fork of your repository. This may be preferred if you do not want the tool to have direct push access to the canonical repository.
You will need to provide a token of a GitHub user to fork the repository and make PRs.
It is recommended to not use your main account as the updater/bot user, since any collaborators of the repository will have access to the GitHub Secret containing the user's token.

Expand Down Expand Up @@ -155,15 +155,16 @@ jobs:

- uses: docker://ghcr.io/flathub/flatpak-external-data-checker:latest
env:
GIT_AUTHOR_NAME: Flatpak External Data Checker
GIT_COMMITTER_NAME: Flatpak External Data Checker
# email sets "github-actions[bot]" as commit author, see https://github.community/t/github-actions-bot-email-address/17204/6
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
# replace these with the name and email of the user you wish to fork and make PRs
# GitHub's autogenerated noreply user email address can be copied from the page mentioned here: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address#setting-your-commit-email-address-on-github
GIT_AUTHOR_NAME: <Updater GitHub user name>
GIT_COMMITTER_NAME: <Updater GitHub user name>
GIT_AUTHOR_EMAIL: <Updater GitHub user email>
GIT_COMMITTER_EMAIL: <Updater GitHub user email>
EMAIL: <Updater GitHub user email>
GITHUB_TOKEN: ${{ secrets.BOT_USER_SECRET }} # replace this with the name of the GitHub Secret where you store the PAT of the user you wish to fork the repo and create PRs
with:
args: --update --always-fork $PATH_TO_MANIFEST # e.g. com.organization.myapp.json
args: --update --always-fork $PATH_TO_MANIFEST # replace this with the path to the manifest, e.g. com.organization.myapp.json
```

### Automatically submitting PRs
Expand Down

0 comments on commit 11cb17e

Please sign in to comment.