Automatic Updates #17293
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: Automatic Updates | |
on: | |
schedule: | |
- cron: "0 */2 * * *" | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 16 | |
- name: Build with Gradle | |
run: ./gradlew run -Dorg.gradle.daemon=false -Dgithubtoken="Bearer ${{ secrets.GITHUB_TOKEN }}" | |
- name: Push changes | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "Github Actions" | |
git add mods.json | |
git add icons/* | |
git commit --allow-empty -m "[auto-update]" | |
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryMods | |