Mirror repositories #21
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: Mirror repositories | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '11 1/6 * * *' | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
mirror: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
repository: | |
- elpa | |
- nongnu | |
steps: | |
- name: Clone | |
run: | | |
git clone https://git.savannah.gnu.org/git/emacs/${{ matrix.repository }}.git | |
- name: Push | |
working-directory: ${{ matrix.repository }} | |
run: | | |
git remote set-url --push origin https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository_owner }}/${{ matrix.repository }}.git | |
git push --force origin HEAD |