Skip to content

Fetch Latest Version Discord #89

Fetch Latest Version Discord

Fetch Latest Version Discord #89

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"