Update KEKL Data #723
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
name: Update KEKL Data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 5 * * *' | |
jobs: | |
kekl: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.TM_GITHUB_TOKEN }} | |
TM_EMAIL: ${{ secrets.TM_EMAIL }} | |
TM_PW: ${{ secrets.TM_PW }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.TM_GITHUB_TOKEN }} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.13.x | |
cache: npm | |
- name: npm ci | |
run: npm ci | |
- name: node . | |
run: node . | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.TM_GITHUB_TOKEN }} | |
file: data.json | |
asset_name: data.json | |
tag: LATEST | |
overwrite: true | |
body: "The latest version of KEKL data" | |
- name: Notify KEKL Hunt | |
run: | | |
git config --global user.name 'hmatt1' | |
git config --global user.email "${TM_EMAIL}" | |
git config --global credential.helper cache | |
git clone https://${{secrets.TM_GITHUB_TOKEN}}@github.com/Trackmania-USA/kekl-hunt | |
cd kekl-hunt | |
date +%s > data-updated.txt | |
git add . | |
git commit -m "$(date)" | |
git push |