Skip to content

Commit 908dffe

Browse files
committed
feat: sync repos under staging folder to individual repos
Signed-off-by: Bird <[email protected]>
1 parent 790918f commit 908dffe

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

.github/sync-staging-repo.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
devstream-io/dtm-github-action-example:
2+
- source: staging/dtm-github-action-example/
3+
dest: .
4+
deleteOrphaned: true
5+
devstream-io/dtm-jenkins-pipeline-example:
6+
- source: staging/dtm-jenkins-pipeline-example/
7+
dest: .
8+
deleteOrphaned: true
9+
devstream-io/dtm-repo-scaffolding-golang:
10+
- source: staging/dtm-repo-scaffolding-golang/
11+
dest: .
12+
deleteOrphaned: true
13+
devstream-io/dtm-repo-scaffolding-golang-cli:
14+
- source: staging/dtm-repo-scaffolding-golang-cli/
15+
dest: .
16+
deleteOrphaned: true
17+
devstream-io/dtm-repo-scaffolding-java-springboot:
18+
- source: staging/dtm-repo-scaffolding-java-springboot/
19+
dest: .
20+
deleteOrphaned: true
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Sync Staging Files to Other Repos
2+
on:
3+
push:
4+
branches: [ main ]
5+
paths:
6+
- staging/**
7+
- .github/workflows/sync-staging-repo.yml
8+
- .github/sync-staging-repo.yml
9+
workflow_dispatch:
10+
11+
jobs:
12+
sync:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
- name: Run GitHub File Sync
18+
uses: BetaHuhn/[email protected]
19+
with:
20+
GH_PAT: ${{ secrets.GH_PAT }}
21+
CONFIG_PATH: .github/sync-staging-repo.yml
22+
ORIGINAL_MESSAGE: true
23+
SKIP_PR: true
24+
COMMIT_EACH_FILE: false

staging/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Staging Repos
2+
3+
This directory contains the staging repositories for the Devstream project.
4+
5+
Each sub folder under `staging/` be synchronized to the repository of the same name under devstream-io.
6+
7+
## How to Create a New Staging Repo
8+
9+
Person who wants to create a new staging repo:
10+
11+
1. Create a new directory under `staging/` with the name of the repo you want to create.
12+
2. Update [`.github/sync-staging-repo.yml`](../.github/sync-staging-repo.yml).
13+
3. Pull Request to the `main` branch of repo `devstream-io/devstream`.
14+
15+
Reviewers:
16+
17+
1. Review the PR, make sure everything is correct, and do not merge it immediately.
18+
2. Create the repo under the `devstream-io` organization and **create a branch for the repo**. If you don't have the permission to create a repo, please ask for the members of the `devstream-io`.
19+
3. Merge the PR.

0 commit comments

Comments
 (0)