-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: trigger cache refreshes via cron
- Loading branch information
1 parent
49702a3
commit 7529911
Showing
2 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: cron-cache | ||
|
||
on: | ||
push: | ||
branches: | ||
- "dev/cron-cache-yml" | ||
schedule: | ||
- cron: "0 0 */5 * *" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
create-release: | ||
name: trigger-cron-ci | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.CI_TOKEN }} | ||
- name: Push a special commit to the CI branch | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} | ||
shell: bash | ||
run: | | ||
ts="$(date "+%F@%T")" | ||
git config --global user.name 'Github Actions' | ||
git config --global user.email 'gh@getbetter.ro' | ||
git branch -D ci-temp || true | ||
git checkout -b ci-temp | ||
git commit --allow-empty --message="[cron] $ts" | ||
git push -u origin ci-temp:ci --force |