mirror of
https://github.com/valitydev/repo-file-sync-action.git
synced 2024-11-06 09:55:21 +00:00
📝 Add examples [skip ci]
This commit is contained in:
parent
a775fcc84b
commit
0b966a3991
64
README.md
64
README.md
@ -165,8 +165,70 @@ Here are a few examples to help you get started!
|
||||
|
||||
### Basic Example
|
||||
|
||||
```yml
|
||||
**.github/workflows/sync.yml**
|
||||
|
||||
```yml
|
||||
name: Sync Files
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@master
|
||||
- name: Run GitHub File Sync
|
||||
uses: BetaHuhn/action-github-file-sync@master
|
||||
with:
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
```
|
||||
|
||||
**.github/sync.yml**
|
||||
|
||||
```yml
|
||||
user/repository:
|
||||
- LICENSE
|
||||
- .gitignore
|
||||
```
|
||||
|
||||
### Sync all workflow files
|
||||
|
||||
This example will keep all your `.github/workflows` files in sync across multiple repositories:
|
||||
|
||||
**.github/workflows/sync.yml**
|
||||
|
||||
```yml
|
||||
name: Sync Workflow Files
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@master
|
||||
- name: Run GitHub File Sync
|
||||
uses: BetaHuhn/action-github-file-sync@master
|
||||
with:
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
```
|
||||
|
||||
**.github/sync.yml**
|
||||
|
||||
```yml
|
||||
group:
|
||||
repos: |
|
||||
user/repo1
|
||||
user/repo2
|
||||
files:
|
||||
- source: .github/workflows/
|
||||
dest: .github/workflows/
|
||||
```
|
||||
|
||||
## 💻 Development
|
||||
|
Loading…
Reference in New Issue
Block a user