.github/workflows/cron-git.yml #11946
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
on: | |
schedule: | |
- cron: "0 * * * *" # Run every hour | |
jobs: | |
git_svn_sync: | |
if: ${{ github.repository == 'madebr/mpg123' }} | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout git mpg123 clone" | |
uses: "actions/checkout@v3" | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
- name: "Configure git client" | |
run: | | |
git config --global user.name "mpg123 GitHub bot" | |
git config --global user.email "[email protected]" | |
- name: "Download (new) revisions from mpg123 git-svn" | |
run: | | |
git remote add mpg123 https://mpg123.org/trunk/.git/ | |
git fetch mpg123 | |
- name: "Merge mpg123's master" | |
run: | | |
git checkout master-with-github-ci | |
git merge mpg123/master -X ours | |
- name: "Force push (new) master" | |
run: | | |
git push origin master-with-github-ci -f | |
git push origin mpg123/master:master -f |