Add jobcreate test and fix bug (#168) #48
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 to Public Repository | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
mirror: | |
runs-on: ubuntu-latest | |
env: | |
ENABLE_MIRROR: ${{ secrets.ENABLE_MIRROR }} | |
steps: | |
- name: Checkout private repository | |
uses: actions/checkout@v4 | |
if: ${{ env.ENABLE_MIRROR == 'true' }} | |
with: | |
# Must be set to avoid conflicting with the subsequent push | |
# https://github.com/ad-m/github-push-action/issues/44#issuecomment-581706892 | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Push to public repository | |
uses: ad-m/[email protected] | |
if: ${{ env.ENABLE_MIRROR == 'true' }} | |
with: | |
github_token: ${{ secrets.PUBLIC_REPO_TOKEN }} | |
repository: render-oss/cli | |
branch: main | |
force: true |