Actions (Tangled Mirror): Checkout into current directory #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Mirror Repo to Tangled.org | |
| on: | |
| workflow_dispatch: | |
| push: | |
| concurrency: | |
| group: tangled-mirror | |
| cancel-in-progress: true | |
| jobs: | |
| tangled-mirror: | |
| runs-on: ubuntu-slim | |
| env: | |
| TANGLED_REPO_URL: [email protected]:solsticegamestudios.com/GModPatchTool | |
| TANGLED_SSH_KEY: ${{ secrets.TANGLED_SSH_KEY }} | |
| steps: | |
| #- name: Install Git | |
| # run: | | |
| # sudo apt install git git-lfs -y | |
| # git lfs install | |
| - name: Checkout Repo | |
| run: git clone --mirror $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git . | |
| - name: Add Tangled Remote | |
| run: git remote add tangled $TANGLED_REPO_URL | |
| - name: Decode SSH key | |
| run: echo $TANGLED_SSH_KEY | base64 --decode "$RUNNER_TEMP/ssh.key" | |
| - name: Push Repo to Mirror | |
| run: | | |
| eval `ssh-agent` | |
| ssh-add "$RUNNER_TEMP/ssh.key" | |
| git push --mirror --force tangled | |
| - name: Cleanup | |
| run: rm "$RUNNER_TEMP/ssh.key" |