Repo Sync #229
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: Repo Sync | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "30 0 * * *" | |
jobs: | |
mirror: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Load secrets with dotenvx | |
uses: andreijiroh-dev/[email protected] | |
if: github.event_name != 'pull_request' | |
id: dotenvx | |
with: | |
path: .env.ci | |
key: ${{ secrets.DOTENV_PRIVATE_KEY_CI }} | |
- name: Setup git | |
run: | | |
git config --global user.name "Recap Time Bot" | |
git config --global user.email "[email protected]" | |
git remote add gitlab "https://${{ steps.dotenvx.outputs.GITLAB_MAUDEV_MIRROR_USERNAME }}:${{ steps.dotenvx.outputs.GITLAB_MAUDEV_MIRROR_TOKEN }}@mau.dev/andreijiroh-dev/docker-images" | |
git fetch gitlab | |
- name: Sync with GitLab repo | |
run: | | |
git merge gitlab/main --ff-only # figure out about rebase later on | |
git push gitlab --mirror | |
continue-on-error: true |