Skip to content

Commit

Permalink
Create update_from_private.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandesh-L authored Jul 15, 2024
1 parent e6b36ad commit 58d618b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/update_from_private.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Update from Private Repo

on:
workflow_dispatch:

jobs:
update-public-repo:
runs-on: ubuntu-latest

steps:
- name: Checkout public repo
uses: actions/checkout@v3
with:
ref: main
- name: Checkout private repo
uses: actions/checkout@v3
with:
repository: access-ci-org/ACCESS-SDS
token: ${{ secrets.PAT }}
path: private-repo

- name: Sync files
run: |
rsync -av --exclude='.git' private-repo/ .
- 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.GITHUB_TOKEN }}

0 comments on commit 58d618b

Please sign in to comment.