Fetch Latest Version Discord #89
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: Fetch Latest Version Discord | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
fetch_latest_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Fetch latest release | |
run: | | |
# Setze deine GitHub-Token-Umgebungsvariable | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
# Hole die neueste Release-Version | |
curl -s -H "Authorization: token $GITHUB_TOKEN" \ | |
https://api.github.com/repos/SpaceTheme/Discord/releases \ | |
| jq -r '.[0].tag_name' > data/discord.txt | |
- name: Commit and push latest release | |
run: | | |
git config --local user.name "GitHub Action" | |
git config --local user.email "[email protected]" | |
git add data/discord.txt | |
git commit -m "Update latest DiscordTheme version" || echo "No new DiscordTheme version" | |
git push || echo "No changes to push" |