Workflow #491
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: Workflow | |
on: | |
schedule: | |
- cron: "0 0 * * *" # execute at 00:00 everyday | |
push: | |
branches: | |
- "**" | |
paths: | |
- ".github/workflows/workflow.yml" | |
- "gh_release_download" | |
- "gh_release_config.yml" | |
- "README.md" | |
workflow_dispatch: | |
jobs: | |
run_script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Run script based on 'gh' and commit download releases | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
./gh_release_download --all --install --verbose | |
rm -rf ./bin && mv ~/.gh_releases/bin ./bin | |
if [ -z "$(git status --porcelain)" ]; then | |
echo "No new files to commit." | |
exit 0 | |
fi | |
git add . | |
git commit -m "Update releases [skip ci]" | |
git push |