Skip to content

Commit

Permalink
Use shared workflow for keep alive (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored Nov 9, 2023
1 parent 2a3bc12 commit 9f2c73f
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/keep-alive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,11 @@ on:
- cron: 0 0 1 * * # Once every month
workflow_dispatch:

env:
GIT_USERNAME: "Exercism Bot"
GIT_EMAIL: "66069679+exercism-bot@users.noreply.github.com"

jobs:
keep_alive:
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
token: ${{ secrets.PAT_EMPTY_COMMITS }}
fetch-depth: 0

- name: Configure the git user
run: |
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_USERNAME"
- name: Create and push an empty commit
run: |
git commit --allow-empty -m "Empty commit"
git push origin main
if: github.repository_owner == 'exercism' # Stops this job from running on forks
uses: exercism/github-actions/.github/workflows/keep-alive.yml@main
with:
repository: ${{ github.event.repository.name }}
secrets:
pat_empty_commits: ${{ secrets.PAT_EMPTY_COMMITS }}

0 comments on commit 9f2c73f

Please sign in to comment.