elementary / elementary/actions

gettext: Use a git credential helper to set token

Open
#55 0 comments 0 reactions 0 assignees View on GitHub
Needs Design Priority: Wishlist
Dominant language
Shell
Stars
39
Forks
9
PR merge metrics
No merged PRs in 30d

Description

The GitHub checkout@v2 action sets the credentials on the repo differently, meaning that doing this does not work anymore:

https://github.com/elementary/actions/blob/4e4476db39b27cc98506d31de20e987b1ec78704/gettext-template/entrypoint.sh#L35

This means that the action can no longer push to protected branches using the elementaryBot token.

Reading this suggests that adding a git credential helper instead should be the solution to this problem:
https://github.com/actions/checkout/issues/162

So it looks like we can add something like this instead:
```
git config credential.https://github.com/.helper "! f() { echo username=x-access-token; echo password=$GITHUB_TOKEN; };f"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.