# Generated by KCL v1.38.0 - DO NOT EDIT # Source: .forgejo/kcl-ci/main.k # kcl-ci local: ~/stuff/gitrepos/wxs/actions/kcl-ci # kcl-ci remote: https://git.wxs.ro/actions/kcl-ci name: Mirror Branch 'on': push: branches: - main paths-ignore: - '.forgejo/kcl-ci/**' - prds/** workflow_dispatch: {} concurrency: group: mirror-${{ github.ref }} cancel-in-progress: true env: READ_REPO_TOKEN: ${{ secrets.READ_REPO_TOKEN }} jobs: update-mirror: name: Update Mirror Branch runs-on: grunt steps: - name: Checkout code uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2 with: fetch-depth: '0' token: ${{ github.token }} - name: Configure git credentials run: |- git config --local user.name "forgejo-actions[bot]" git config --local user.email "forgejo-actions[bot]@git.wxs.ro" # Clear checkout action's extraheader (read-only token) git config --local --unset-all http.https://git.wxs.ro/.extraheader || true # Set remote URL with write token git remote set-url origin "https://token:${GITHUB_TOKEN}@git.wxs.ro/${{ github.repository }}.git" env: GITHUB_TOKEN: ${{ github.token }} - name: Create mirror branch run: |- # Create or reset the mirror branch from current HEAD git checkout -B codeberg # Remove excluded paths rm -rf .forgejo rm -rf prds # Commit and force-push git add -A git commit -m "mirror: $(git log -1 --format='%h %s' main) [skip ci]" || echo "No changes to commit" git push origin codeberg --force env: GITHUB_TOKEN: ${{ github.token }}