feat: mirror

This commit is contained in:
Leandro Costa 2025-05-28 11:03:02 -03:00
commit b0f74cb8d9

View file

@ -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