Skip to content

Instantly share code, notes, and snippets.

@nikooo777
Last active March 10, 2023 15:57
Show Gist options
  • Save nikooo777/b213a3c90e7bb5462dae5cb5380c8191 to your computer and use it in GitHub Desktop.
Save nikooo777/b213a3c90e7bb5462dae5cb5380c8191 to your computer and use it in GitHub Desktop.
How to configure github actions importer

How to configure the importer

The documentation is very lacking (probably because this is new?) and it took me some extra time to figure out where to get the tokens and how to configure the importer.

gh actions-importer configure

When you run this step gh actions-importer configure you need to provide personal access tokens for both github and the platform you're trying to migrate from. In my case it's Travis CI and that's what I will cover here, however the steps to acquire the personal access token for github are the same.

Personal access token for GitHub

Tl;dr go here: https://github.com/settings/tokens

Basically

  • open your settings (from the top right)
  • On the left side at the very bottom select Developer settings
  • Personal Access Tokens -> Tokens (classic)
  • Generate new token (classic)
  • Give it the Repo scopes
  • Generate the token

Save the token for later

Personal access token for Travis CI

Follow this procedure to install travis CLI: https://github.com/travis-ci/travis.rb#installation

Follow this procedure to get the token: https://developer.travis-ci.com/authentication Note: I couldn't find the travis binary because my paths were not set correctly (probably everyone is like this out of the box?). You'll likely find the travis bin here: ~/.gem/bin/travis

if you get

Try running with --github-token or --auto-token .
all GitHub tokens given were invalid

Then run ./travis login --pro --github-token TOKEN_FROM_STEPS_ABOVE_HERE

Configuration

gh actions-importer configure
✔ Which CI providers are you configuring?: Travis CI
Enter the following values (leave empty to omit):
✔ Personal access token for GitHub: ****************************************
✔ Base url of the GitHub instance: https://github.com
✔ Personal access token for Travis CI: **********************
✔ Base url of the Travis CI instance: https://travis-ci.com
✔ Travis CI organization name: YourOrgNameOnTravis
Environment variables successfully updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment