Merge pull request #2 from egnyte/release/1.1.1 #7
This file contains 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 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
mirror: | |
if: github.repository != 'egnyte/secure-and-govern-for-splunk' && startsWith(github.repository, 'egnyte/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Push to public repo | |
env: | |
MIRROR_TO_PUBLIC_PRIVATE_KEY: ${{ secrets.MIRROR_TO_PUBLIC_PRIVATE_KEY }} | |
run: | | |
# configure SSH client | |
eval $(ssh-agent -s) | |
echo "${MIRROR_TO_PUBLIC_PRIVATE_KEY}" | base64 -d | ssh-add - | |
mkdir ~/.ssh | |
echo "github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=" > ~/.ssh/known_hosts | |
# push the current branch | |
git remote add github [email protected]:egnyte/secure-and-govern-for-splunk.git | |
git push -u github $GITHUB_REF_NAME |