This action automatically pushed aliases to Avrae that have been pushed to the master branch (with a bit of setup).
- Python 3.8.x
- https://avrae.io Account
- Basic File Management/Command Line Knowledge
For this you will need to do some changes to your repository, as well as acquire Alias ID's for all the aliases that you wish to automatically update.
Important Note, this script will only recognize alias files that end in
.alias
or.snippet
- Clone this repository to your computer, as it has some scripts you will need to run.
- Get your Avrae Token. You can do this by going to the Avrae Website and opening up the developer console. Then, go to Storage, Local Storage, and copy the value of the avrae_token.
- With your Avrae Token, go to your GitHub Repository and click settings. Then, near the bottom-left click Secrets. Click New Secret and call it
AVRAETOKEN
, and put your token into the value textbox.
- With your Avrae Token, go to your GitHub Repository and click settings. Then, near the bottom-left click Secrets. Click New Secret and call it
- Make a new folder in your repository called
.github/workflows
. In this folder make a document calledupdate_workflow.yml
. Paste the contents of theexample-workflow.yml
file (that exists in this repository) into yourupdate_workflow.yml
- In the base of your repository, make a file called
alias-ids.json
.- Before doing this, in your cloned version of the repository, navigate to the
scripts
folder and open a terminal there. For each collection you would like to auto-update, runpython aliases_from_collection.py (id of collection)
(You can get the ID of your collection by looking at the URL bar when on the collections page. it will look something like5xxxxxxxxxxxxxxxxxxxxxxx
). Keep the output of this script, as you will need the ID's - In your new alias-ids.json file, you will need to create a dictionary of file paths to alias ids. For example:
- Before doing this, in your cloned version of the repository, navigate to the
{
"aliases/test-alias.alias": "5xxxxxxxxxxxxxxxxxxxxxxx"
}
- Add these new files to your git repository and push to the
master
branch. The workflow should automatically start running.
If you find a bug/issue with anything in this repository, open an issue! If you would like to make a change, open a PR
If you have any other questions contact me at the Avrae Discord. My username is Dr Turtle#1771.