Better P2P: Sorting Improvements + Show Distance #58
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
# Tells Nomi-CEu-Translations to Update English Lang | |
name: "Update English Lang in Nomi-CEu-Translations" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
# Only Update English Lang on Branch Main | |
- main | |
paths: | |
# Specify the path to 'assets' folder, suffixed by '/**/[eE][nN]_[uU][sS].lang', then another one, suffixed by '/**/[eE][nN]-[uU][sS].lang' (Can't use character group [-_]) | |
- "src/main/resources/assets/**/[eE][nN]_[uU][sS].lang" | |
- "src/main/resources/assets/**/[eE][nN]-[uU][sS].lang" | |
jobs: | |
updateLang: | |
name: Update English Lang in Nomi-CEu-Translations | |
runs-on: ubuntu-latest | |
steps: | |
# We have to use a custom app token, as the default GITHUB_TOKEN only has access to the base repo. | |
# Nomi-CEu-Management has access to all of Nomi-CEu's Repos. | |
- name: Get Token | |
id: token | |
uses: actions/create-github-app-token@v1 | |
with: | |
# Shared Org Secret: Contains the Nomi-CEu-Management App ID (773030) | |
app-id: ${{ secrets.APP_ID }} | |
# Shared Org Secret: Contains the Nomi-CEu-Management App's Private Key. | |
# run `cat {PEM_FILE_PATH} | base64 -w 0 && echo` to encode the key first if changing the key. | |
# Paste the output of the command into the secret value. | |
private-key: ${{ secrets.APP_KEY }} | |
owner: Nomi-CEu | |
- name: Dispatch Workflow | |
uses: actions/github-script@v5 | |
with: | |
github-token: ${{ steps.token.outputs.token }} | |
# A Javascript Function Body to send the Workflow Dispatch Event. | |
script: | | |
await github.rest.repos.createDispatchEvent({ | |
owner: "Nomi-CEu", | |
repo: "Nomi-CEu-Translations", | |
event_type: "update_english_lang", | |
client_payload: { | |
module: "nomi-labs", | |
}, | |
}); |