Merge pull request #76 from NextCafeteria/update/add-internationaliza… #45
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
on: | |
push: | |
branches: | |
- master | |
jobs: | |
mirror_job: | |
runs-on: ubuntu-latest | |
name: Mirror | |
if: github.repository == 'NextCafeteria/cafeteria' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- uses: pixta-dev/repository-mirroring-action@v1 | |
with: | |
target_repo_url: [email protected]:${{ secrets.MIRROR_REPO }}.git | |
ssh_private_key: ${{ secrets.SSH_KEY }} | |
- name: Set SSH key | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | |
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts | |
chmod 600 ~/.ssh/id_rsa | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} | |
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }} | |
- name: Push to mirror repo | |
run: | | |
git remote add mirror [email protected]:${{ secrets.MIRROR_REPO }}.git | |
git fetch mirror master | |
git push mirror master |