Skip to content

Actions (Tangled Mirror): Properly add and use tangled remote #5

Actions (Tangled Mirror): Properly add and use tangled remote

Actions (Tangled Mirror): Properly add and use tangled remote #5

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: git@tangled.sh: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.repositoryUrl }}
- 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"