-
-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (31 loc) · 947 Bytes
/
cronjob.yml
File metadata and controls
37 lines (31 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Github Action with a cronjob trigger
on:
schedule:
- cron: "0 0 1/10 * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
sync-files:
name: "Run sync"
runs-on: ubuntu-latest
steps:
- name: "Checkout source repository"
uses: actions/checkout@v6
- name: "Release date"
run: |
date > latest-release.txt
- name: "Push to Source"
run: |
git config --global user.name "ivan-hc"
git config --global user.email "noreply@github.com"
git add latest-release.txt
if git diff-index --quiet HEAD; then
echo "No changes to commit." >> $GITHUB_STEP_SUMMARY
else
git commit -m "Sync files from source repository"
git push && echo "Sync to Source succeeded" >> $GITHUB_STEP_SUMMARY
fi