From e90a2d0ed9a4be2bfce8b736051306bd1027ced2 Mon Sep 17 00:00:00 2001 From: Colin Hutchinson Date: Fri, 2 Dec 2022 20:03:16 -0500 Subject: [PATCH] docs(README): update the README.md (#5) * 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 --- .github/template-sync.yml | 7 ++++--- .github/workflows/release.yaml | 4 ++++ .github/workflows/sync.yml | 26 +++----------------------- README.md | 12 ++++++++---- 4 files changed, 19 insertions(+), 30 deletions(-) diff --git a/.github/template-sync.yml b/.github/template-sync.yml index 47f7997..5063a49 100644 --- a/.github/template-sync.yml +++ b/.github/template-sync.yml @@ -1,5 +1,6 @@ --- additional: +- kong-openssl files: - '!README.md' @@ -13,6 +14,6 @@ files: - '!Dockerfile' - '!build.sh' - '!test.sh' -- .github/workflows/release.yaml -- .releaserc -- Makefile +- '!.github/workflows/release.yaml' +- '!.releaserc' +- '!Makefile' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f7cc54a..4bcbc70 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 9b36909..e66e634 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -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/action-workflow-queue@v1.1 @@ -38,4 +18,4 @@ jobs: - name: Sync uses: ahmadnassri/action-template-repository-sync@v2.2.0 with: - github-token: ${{ secrets.GH_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 3f9641a..8d99bfa 100644 --- a/README.md +++ b/README.md @@ -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`