KeepActionAlive #708
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: 'KeepActionAlive' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
auto_renew: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout codes' | |
uses: actions/checkout@v2 | |
- name: 'Avoid Github Workflow being suspended' | |
run: echo $(cat /proc/sys/kernel/random/uuid) > UUID.txt | |
- name: 'Commit Files' | |
id: commit | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GDWGH" | |
git add . | |
git diff --quiet && git diff --staged --quiet || git commit -am 'Keep Github Action Alive XD' | |
echo ::set-output name=status::success | |
- name: 'GitHub Push' | |
if: steps.commit.output.status != 'success' | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |