commit b0f74cb8d98e12e5dd57d6c51486fcc46afca40c Author: Leandro Costa Date: Wed May 28 11:03:02 2025 -0300 feat: mirror diff --git a/.forgejo/workflows/mirror.yml b/.forgejo/workflows/mirror.yml new file mode 100644 index 0000000..b7f2b6d --- /dev/null +++ b/.forgejo/workflows/mirror.yml @@ -0,0 +1,36 @@ +name: Reusable Mirror Workflow + +on: + workflow_call: + inputs: + remote_url: + required: true + type: string + force: + required: false + type: boolean + default: false + +jobs: + push: + runs-on: docker + container: + image: node:20-alpine + steps: + - name: Instalando dependencias + run: | + apk add git + + - name: Checkout código + uses: actions/checkout@v4 + with: + fetch-depth: 0 # ✅ clone completo + + - name: Push branch atual + run: | + git remote add mirror ${{ inputs.remote_url }} + if [ "${{ inputs.force }}" = "true" ]; then + git push --force mirror HEAD + else + git push mirror HEAD + fi