Skip to content

Commit

Permalink
Gettext: More clarity in instructions (#16)
Browse files Browse the repository at this point in the history
Okay, after testing on a personal repo this should be more clear and accurate regarding the Personal Access Token, scope, and user permissions.
  • Loading branch information
cassidyjames authored and kgrubb committed Nov 5, 2019
1 parent e49189a commit 56a35ac
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions gettext-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ This image is intended for use with elementary debian projects. There are a few

### Environment Variables

In order to create tags and push changes to various branches, the script needs a GitHub token. Keep in mind, when using GitHub workflows, the virtual environment [automatically comes with a generated GitHub token secret](https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secret). However, if your translation branch is protected, you may need to generate a user token with admin permissions.
In order to create tags and push changes to various branches, the script needs a GitHub token. When using GitHub workflows, the virtual environment [automatically comes with a generated GitHub token secret](https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secret). However, if your translation branch is protected, you will need to use a Personal Access Token with the `repo` scope, generated by a user who has admin permissions for the repo.

### Specifying a translation branch name
#### Git User

By default, this action will use a branch named 'master' to to push the changes. The branch name can be set via the `translation_branch` input. Example:
Instead of using the default GitHub token (`GITHUB_TOKEN`), you can use a custom Personal Access Token with the `GIT_USER_TOKEN` environment variable. You can also use the following environment variables to set the git user and email:

```yaml
with:
translation_branch: 'i18n'
env:
GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}"
GIT_USER_NAME: "example-user"
GIT_USER_EMAIL: "[email protected]"
```
### Git User
### Specifying a translation branch name
Instead of using the default GitHub token (`GITHUB_TOKEN`), you can use a custom git user token with the `GIT_USER_TOKEN` environment variable. You can also use the following environment variables to set the git user & email:
By default, this action will use a branch named 'master' to to push the changes. The branch name can be set via the `translation_branch` input. Example:

```yaml
env:
GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}"
GIT_USER_NAME: "example-user"
GIT_USER_EMAIL: "[email protected]"
with:
translation_branch: 'i18n'
```

## Examples
Expand Down

0 comments on commit 56a35ac

Please sign in to comment.