diff --git a/.github/sync-staging-repo.yml b/.github/sync-staging-repo.yml new file mode 100644 index 000000000..440e2b061 --- /dev/null +++ b/.github/sync-staging-repo.yml @@ -0,0 +1,36 @@ +devstream-io/dtm-gitlab-share-library: + - source: staging/dtm-gitlab-share-library/ + dest: . + deleteOrphaned: true +devstream-io/dtm-jenkins-share-library: + - source: staging/dtm-jenkins-share-library/ + dest: . + deleteOrphaned: true +devstream-io/dtm-pipeline-templates: + - source: staging/dtm-pipeline-templates/ + dest: . + deleteOrphaned: true +devstream-io/dtm-repo-scaffolding-golang: + - source: staging/dtm-repo-scaffolding-golang/ + dest: . + deleteOrphaned: true +devstream-io/dtm-repo-scaffolding-golang-cli: + - source: staging/dtm-repo-scaffolding-golang-cli/ + dest: . + deleteOrphaned: true +devstream-io/dtm-repo-scaffolding-golang-gin: + - source: staging/dtm-repo-scaffolding-golang-gin/ + dest: . + deleteOrphaned: true +devstream-io/dtm-repo-scaffolding-java-springboot: + - source: staging/dtm-repo-scaffolding-java-springboot/ + dest: . + deleteOrphaned: true +devstream-io/dtm-repo-scaffolding-python: + - source: staging/dtm-repo-scaffolding-python/ + dest: . + deleteOrphaned: true +devstream-io/dtm-repo-scaffolding-python-flask: + - source: staging/dtm-repo-scaffolding-python-flask/ + dest: . + deleteOrphaned: true diff --git a/.github/workflows/sync-staging-repo.yml b/.github/workflows/sync-staging-repo.yml new file mode 100644 index 000000000..928212dc9 --- /dev/null +++ b/.github/workflows/sync-staging-repo.yml @@ -0,0 +1,24 @@ +name: Sync Staging Files to Other Repos +on: + push: + branches: [ main ] + paths: + - staging/** + - .github/workflows/sync-staging-repo.yml + - .github/sync-staging-repo.yml + workflow_dispatch: + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Run GitHub File Sync + uses: BetaHuhn/repo-file-sync-action@v1.16.5 + with: + GH_PAT: ${{ secrets.GH_PAT }} + CONFIG_PATH: .github/sync-staging-repo.yml + ORIGINAL_MESSAGE: true + SKIP_PR: true + COMMIT_EACH_FILE: false diff --git a/staging/README.md b/staging/README.md new file mode 100644 index 000000000..5fbecd1d7 --- /dev/null +++ b/staging/README.md @@ -0,0 +1,19 @@ +# Staging Repos + +This directory contains the staging repositories for the Devstream project. + +Each sub folder under `staging/` be synchronized to the repository of the same name under devstream-io. + +## How to Create a New Staging Repo + +Person who wants to create a new staging repo: + +1. Create a new directory under `staging/` with the name of the repo you want to create. +2. Update [`.github/sync-staging-repo.yml`](../.github/sync-staging-repo.yml). +3. Pull Request to the `main` branch of repo `devstream-io/devstream`. + +Reviewers: + +1. Review the PR, make sure everything is correct, and do not merge it immediately. +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`. +3. Merge the PR.