Merge pull request #137 from kirchners-manta/development #9
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 to Public Repository | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
if: github.repository == 'kirchners-manta/conan_development' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Set up SSH | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.MIRROR_ACCESS_TOKEN }}" > ~/.ssh/id_ed25519 | |
chmod 600 ~/.ssh/id_ed25519 | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
- name: Set up Git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
- name: Commit and push changes to public repository | |
env: | |
GIT_SSH_COMMAND: 'ssh -i ~/.ssh/id_ed25519' | |
run: | | |
git remote add public_repo git@github.com:kirchners-manta/conan.git | |
git push public_repo main |