2021-08-12 13:05:00 +08:00
|
|
|
name: mirror to dotfiles
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
mirror:
|
2021-08-12 13:09:37 +08:00
|
|
|
name: mirror to dotfiles
|
|
|
|
runs-on: ubuntu-latest
|
2021-08-12 13:05:00 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.head_ref }}
|
2021-09-02 10:24:44 +08:00
|
|
|
fetch-depth: 0
|
2021-08-12 13:05:00 +08:00
|
|
|
- name: load ssh key
|
|
|
|
env:
|
|
|
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
|
|
|
run: |
|
|
|
|
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
|
|
|
ssh-add - <<< "${{ secrets.MIRROR_SSH_PRIVATE_KEY }}"
|
|
|
|
- name: add remote and push
|
|
|
|
env:
|
|
|
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
|
|
|
run: |
|
|
|
|
git remote add mirror git@github.com:serverwentdown/dotfiles.git
|
|
|
|
git push -f mirror main
|
|
|
|
|
|
|
|
# vim: set et ts=2 sw=2:
|