Skip to content

Update from Private Repo #26

Update from Private Repo

Update from Private Repo #26

name: Update from Private Repo
on:
workflow_dispatch:
jobs:
update-public-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout public repository
uses: actions/checkout@v3
with:
ref: main
- name: Checkout private repository
uses: actions/checkout@v3
with:
repository: access-ci-org/ACCESS-SDS
token: ${{ secrets.PAT }}
path: ACCESS-SDS
- name: Sync files
run: |
rsync -av --delete-during --exclude='.git' --exclude='.github' --exclude='README.md' ACCESS-SDS/ . || true
rm -r ACCESS-SDS
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Update from private repo"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.PAT }}