Update mirror.yml #1
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 Main Branch and Tags | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
mirror: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Push main branch and tags to mirror repo | |
env: | |
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }} | |
run: | | |
git remote add mirror "https://${{ secrets.BOT_TOKEN }}@github.com/Codeinwp/themeisle-sdk-lib" | |
git push mirror master --force # Push only the main branch | |
git push mirror --tags --force # Push all tags |