forked from aws/aws-sam-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (26 loc) · 917 Bytes
/
sync-to-mirror-repo.yml
File metadata and controls
29 lines (26 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: "Sync to Mirror Repo"
on:
schedule:
# Run twice daily at 3am and 3pm PST
- cron: '0 11,23 * * *'
workflow_dispatch: # Allow manual trigger
jobs:
sync-from-public:
runs-on: ubuntu-latest
if: github.repository != 'aws/aws-sam-cli' # Only run in mirror repo
permissions:
contents: write
steps:
- name: Checkout public repo
uses: actions/checkout@v6
with:
repository: aws/aws-sam-cli
ref: develop
fetch-depth: 0
persist-credentials: false
- name: Push to mirror repo
run: |
git config user.name "aws-sam-cli-bot"
git config user.email "aws-sam-cli-gh-bot@amazon.com"
git config --unset-all http.https://github.com/.extraheader || true
git push https://x-access-token:${{ secrets.SYNC_REPO_PAT }}@github.com/${{ github.repository }}.git develop:develop --force