Skip to content

Commit

Permalink
fix: Synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Jan 29, 2022
1 parent b8dfa5a commit a473c56
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/propagate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
set -x;
git add starters pipelines
git commit -m "chore: propagate files [skip ci]" || true
git branch -D release || true
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ Shared pipelines designed like in Jenkins X.

Everytime, when a new repository is created a structure from `packs/{{ technology name }}` should be copied into a fresh repository.

1. Copy files and directories from this repository - `packs/{{ technology name }}` to your repository root directory
2. Run `bash ci-sync.sh`
3. Edit variables in `.github/helpers/ci-vars.env`
4. Run `python .github/helpers/apply-vars.py`
5. `git add .`
6. `git commit -m "feat: Add CI"`
7. `git push`
1. Generate a new **Personal Access Token** (with access to modifying workflows)
2. Save it into organization or repository secrets as `WORKFLOW_UPDATE_TOKEN`
3. Copy files and directories from this repository - `packs/{{ technology name }}` to your repository root directory
4. Run `bash ci-sync.sh`
5. Edit variables in `.github/helpers/ci-vars.env`
6. Run `python .github/helpers/apply-vars.py`
7. `git add .`
8. `git commit -m "feat: Add CI"`
9. `git push`

## pipelines

Expand Down
6 changes: 5 additions & 1 deletion pipelines/.shared/.github/workflows/synchronize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_UPDATE_TOKEN }}

- name: Synchronize files
run: |
sh ci-sync.sh
- name: Commit and push
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add .github
git commit -m "chore: synchronize pipelines" || true
git commit -m "chore: synchronize pipelines [skip ci]" || true
git push --force

0 comments on commit a473c56

Please sign in to comment.