diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 0000000..48ace8c --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,33 @@ +name: Mirroring + +on: + push: + delete: + +jobs: + to_codeberg: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Configure 1Password Service Account + uses: 1password/load-secrets-action/configure@v1 + with: + service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + + - name: Load Codeberg credentials + id: load-codeberg-credentials + uses: 1password/load-secrets-action@v1 + with: + export-env: false + env: + codeberg_ssh: "op://Security/Codeberg/private key"?ssh-format=openssh + + - name: Mirroring to Codeberg + uses: pixta-dev/repository-mirroring-action@v1 + with: + target_repo_url: git@codeberg.org:anhkhoakz/pages.git + ssh_private_key: ${{ secrets.codeberg_ssh }}