name: Mirror to Codeberg on: workflow_dispatch: push: jobs: codeberg: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 token: ${{ secrets.PAT_TOKEN }} - name: check for 404 run: | url="https://codeberg.org/diyhrt/pages" status=$(curl -o /dev/null -s -w "%{http_code}" $url) if [ $status -eq 404 ]; then echo "Got 404. Exiting." curl -H "Content-Type: application/json" -d '{"content": "${{ secrets.DISCORD_USER_ID }} $URL returned 404"}' ${{ secrets.WEBHOOK_URL }} exit 1 fi - uses: pixta-dev/repository-mirroring-action@v1.1.1 with: target_repo_url: "git@codeberg.org:diyhrt/pages.git" ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} secret_mirror: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 token: ${{ secrets.PAT_TOKEN }} - uses: pixta-dev/repository-mirroring-action@v1.1.1 with: target_repo_url: "${{ secrets.SECRET_MIRROR_URL }}" ssh_private_key: ${{ secrets.SECRET_SSH_PRIVATE_KEY }}