Keep the repository active #15
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: Keep the repository active # so GitHub Actions keep triggering | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '42 13 1 * *' | |
workflow_dispatch: # allows to be run manually | |
env: | |
COMMITER_EMAIL: [email protected] | |
BRANCH: automation | |
jobs: | |
empty_commit: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
- name: Create empty commit | |
run: | | |
git config --local user.email "${COMMITER_EMAIL}" | |
git config --local user.name "github-actions" | |
git commit --allow-empty -m "Keep the repository active - $(date +%Y-%m-%d)" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ env.BRANCH }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |