-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add import-token option to use with private repos (#252)
This adds a new 'import-token' input to be used when importing a private repo. Otherwise the step fails with the following error on 'vcs import', since it tries to read a username and a password from stdin: fatal: could not read Username for 'https://github.com': No such device or address The token is used in the HTTPS URL itself, e.g.: https://[token@]github.com/user/repo.git Note that this doesn't use the approach suggested in #224. This is more of a simple workaround given the current logic. Signed-off-by: Christophe Bedard <[email protected]> Co-authored-by: Anas Abou Allaban <[email protected]> Co-authored-by: Emerson Knapp <[email protected]>
- Loading branch information
1 parent
9f9478c
commit dcef08a
Showing
4 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,6 +191,18 @@ GitHub workflows can persist data generated in workers during the build using [a | |
- if: always() # upload the logs even when the build fails | ||
``` | ||
|
||
### Use with a private repo | ||
|
||
If using `action-ros-ci` with a private repo, it needs a personal access token to be able to checkout the code. | ||
Generate a [personal access token](https://github.com/settings/tokens) with the "repo" scope and add it to your repo's [secrets][creating-encrypted-secrets]. | ||
For example, if your secret is called `REPO_TOKEN`: | ||
|
||
```yaml | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
package-name: my_package | ||
import-token: ${{ secrets.REPO_TOKEN }} | ||
``` | ||
|
||
## License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters