add mirror pipeline #1

merged
opened by belsanti.xyz targeting main from mirror-action

Mirror main to Codeberg and Github

Changed files
+31
.tangled
workflows
+31
.tangled/workflows/mirror.yaml
···
+
when:
+
- event: [ "push", "manual" ]
+
branch: [ "main" ]
+
+
dependencies:
+
nixpkgs:
+
- git
+
- openssh
+
+
engine: "nixery"
+
+
clone:
+
depth: 1
+
+
steps:
+
- name: add codeberg remote
+
command: |
+
git remote add github git@github.com:michaelBelsanti/nixconfig.git
+
- name: add github remote
+
command: |
+
git remote add github git@github.com:michaelBelsanti/nixconfig.git
+
- name: push to codeberg
+
environment:
+
GIT_SSH_COMMAND="ssh -i <(echo \"$GITHUB_REPO_KEY\")"
+
command: |
+
git push codeberg main
+
- name: push to githuub
+
environment:
+
GIT_SSH_COMMAND="ssh -i <(echo \"$CODEBERG_REPO_KEY\")"
+
command: |
+
git push github main