From 240ce0b37bf74574182bae5a9ed0be72b13554be Mon Sep 17 00:00:00 2001 From: anhkhoakz Date: Tue, 23 Jan 2024 00:21:45 +0700 Subject: [PATCH] Add files --- .github/workflows/mirror.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/mirror.yml 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 }}