Skip to content

Commit

Permalink
docs(README): update the README.md (#5)
Browse files Browse the repository at this point in the history
* docs(README): update the docs

* chore(ci): these jobs can take expensive time so cancel them when possible

* chore(sync): add the sync target

* fix(ci): adjustments to the sync ci
  • Loading branch information
hutchic authored Dec 3, 2022
1 parent e519904 commit e90a2d0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 30 deletions.
7 changes: 4 additions & 3 deletions .github/template-sync.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
additional:
- kong-openssl

files:
- '!README.md'
Expand All @@ -13,6 +14,6 @@ files:
- '!Dockerfile'
- '!build.sh'
- '!test.sh'
- .github/workflows/release.yaml
- .releaserc
- Makefile
- '!.github/workflows/release.yaml'
- '!.releaserc'
- '!Makefile'
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on: # yamllint disable-line rule:truthy
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
release:
name: Create Release
Expand Down
26 changes: 3 additions & 23 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,12 @@ name: Sync the template repository
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches: main
branches:
- main

jobs:
metadata:
runs-on: ubuntu-latest

outputs:
repository: ${{ steps.metadata.outputs.repository }}
dockerfile: ${{ steps.dockerfile.outputs.exists }}

steps:
- uses: actions/checkout@v3

- id: metadata
uses: ahmadnassri/action-metadata@v2

sync:

needs:
- metadata

# only runs if the repository is a template
if: ${{ fromJSON(needs.metadata.outputs.repository).is_template }}

runs-on: ubuntu-latest

steps:
- name: Queue
uses: ahmadnassri/[email protected]
Expand All @@ -38,4 +18,4 @@ jobs:
- name: Sync
uses: ahmadnassri/[email protected]
with:
github-token: ${{ secrets.GH_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ Use this template as a sensible baseline for new github repositories.
## Instructions

- Create template from repository
- From the new repository settings page enable "Automatically delete head branches" as well as "Allow auto-merge"
- From the new repository branches page create branch protection rule for `main` that requires "pre-commit" to pass as well as "Require a pull request before merging"
- Install the [settings app](https://github.com/apps/settings) on the new repository
- Remove and re-add the `.github/settings.yml` file so the settings app gets enabled
- From the new repository settings page enable "Allow auto-merge"
- Following the [CODEOWNERS SYNTAX](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax) guidelines, update the new repository CODEOWNERS file
- Following our [Github bot guidline documentation](https://konghq.atlassian.net/wiki/spaces/ENGEN/pages/2720268304/How+To+-+Github+Automation+Guidelines) add a github and dependabot secret for AUTO_MERGE_TOKEN
- Open a pull request on the new repository that seeds the secret baseline file `detect-secrets scan > .secrets.baseline` as well as a sensible README.md
- **Update** the .github/template-sync.yml file in [kong/template-generic](https://github.com/Kong/template-generic) repository with the **cloned repository name** to enable template sync changes
- **Update** the .github/template-sync.yml file in [kong/template-github-release](https://github.com/Kong/template-github-release) repository with the **cloned repository name** to enable template sync changes
- Update .releaserc to have the correct repository name
- Correct the image name in `.github/workflows/release.yaml`
- Correct the image name in `Makefile`
- Remove the sync workflow at `.github/template-sync.yml` and `.github/workflows/sync.yml`

0 comments on commit e90a2d0

Please sign in to comment.