# Role import from GitHub results in "master" release, not the tag release, breaking installs

**URL:** <https://forum.ansible.com/t/role-import-from-github-results-in-master-release-not-the-tag-release-breaking-installs/1856>\
**Category:** Get Help\
**Tags:** role, galaxy-ng\
**Created:** [October 22, 2023, 4:09am UTC](https://forum.ansible.com/t/role-import-from-github-results-in-master-release-not-the-tag-release-breaking-installs/1856 "2023-10-22T04:09:01Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![L3D](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/l3d/32/911_2.png) [@L3D](https://forum.ansible.com/u/L3D)\
**Post date:** [October 26, 2023, 11:40am UTC](https://forum.ansible.com/t/role-import-from-github-results-in-master-release-not-the-tag-release-breaking-installs/1856/5 "2023-10-26T11:40:27Z")

</div>

I figured out, the `--branch` option is used for the galaxy-ng version. So if you are on your latest release tag on the `main` or `master` branch, you can run:

```bash
ansible-galaxy role import \
  --api-key <GalaxyAPIKey> \
  --branch <YourGitReleaseTag> \
  github_username github_repo

```

I created a github action, that can import new ansible role release with the correct set version to galaxy.ng: [Action Ansible Galaxy Release · Actions · GitHub Marketplace · GitHub](https://github.com/marketplace/actions/action-ansible-galaxy-release)  
It is using the `GITHUB_REF_NAME` enviroment variable as version name.

I created a post about this topic here:

> [@What is the purpose of the --branch on galaxy role import](http://forum.ansible.com/t/what-is-the-purpose-of-the-branch-on-galaxy-role-import/1974):
>
> Hello all, Now that showing the version on galaxy-ng is working again, I am a bit confused. Because my imported roles suddenly have the option “main” several times. This can be seen, for example, in the test role roles-ansible.test that I made to test the import on galaxy-ng in more detail: [[image]](https://galaxy.ansible.com/ui/standalone/roles/roles-ansible/test/) I created a github action to import ansible-roles to galaxy-ng: [Action Ansible Galaxy Release · Actions · GitHub Marketplace · GitHub](https://github.com/marketplace/actions/action-ansible-galaxy-release) And I noticed, the string in the “–branch” version is used as…

---

_[View the full topic](https://forum.ansible.com/t/role-import-from-github-results-in-master-release-not-the-tag-release-breaking-installs/1856)._
