Skip to content

Release 0.2.0

Release 0.2.0 #125

name: Push to remote repo on incoming push to this repo
on: [ push, workflow_dispatch ]
jobs:
push-to-remote:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' # run this job only for the main branch
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
ref: main
- name: Push checked out repo to remote
env:
URL: ${{ secrets.REMOTE_URL }}
PAT: ${{ secrets.REMOTE_PAT }}
run: |
echo -e "* On branch"
echo -e "---"
git branch --show-current
echo -e "\n* List checked out contents of github repo"
echo -e "---"
ls -l
echo -e "\n* Push main branch to remote repo"
echo -e "---"
# git -c http.extraheader="Authorization: Basic $PAT" push --force $URL main
git -c http.extraheader="Authorization: Basic $PAT" push $URL main:temp