diff --git a/.github/workflows/_gitops-pr-to-release.yml b/.github/workflows/_gitops-pr-to-release.yml index 6787c9a..5edfb64 100644 --- a/.github/workflows/_gitops-pr-to-release.yml +++ b/.github/workflows/_gitops-pr-to-release.yml @@ -16,7 +16,9 @@ jobs: pr_to_release: uses: ./.github/workflows/go-pr-to-release.yml with: - release_branch: ${{ vars.GITOPS_RELEASE_BRANCH || 'release' }} + release_branch: ${{ vars.GIT_RELEASE_BRANCH || 'release' }} secrets: - # since job does auto merge pat needs read/write to PRs and to Actions github_pat: ${{ secrets.GA_WORKFLOWS_CI_PR_RW_AND_ACTIONS_RW }} + # - `Contents` Write, to allow **merging (auto) PRs** + # - `Pull Requests` Write, to allow **opening PRs** + # - `Actions` Write, to allow **triggering Workflows** diff --git a/.github/workflows/_labeler.yml b/.github/workflows/_labeler.yml index 0d7b267..9e319b3 100644 --- a/.github/workflows/_labeler.yml +++ b/.github/workflows/_labeler.yml @@ -14,4 +14,4 @@ jobs: # PAT with 2 permissions for: # - 'Pull requests' -> 'create labels': to allow this Action to create labels # - 'Actions' -> 'Workflows': to enable triggering other Workflows (listening to label creation events) - repo-token: ${{ secrets.GA_WORKFLOWS_CI_LABELER }} + repo-token: ${{ secrets.GA_WORKFLOWS_CI_PR_RW_AND_ACTIONS_RW }} diff --git a/.github/workflows/go-pr-to-release.yml b/.github/workflows/go-pr-to-release.yml index e2122c5..e75a4dd 100644 --- a/.github/workflows/go-pr-to-release.yml +++ b/.github/workflows/go-pr-to-release.yml @@ -118,7 +118,7 @@ jobs: if [ -n "${{ inputs.backwords_compatibility }}" ]; then echo "[WARN]: Unsupported value for input 'backwords_compatibility': '${{ inputs.backwords_compatibility }}'" >> $GITHUB_STEP_SUMMARY else - echo "[INFO]: Value for input `backwords_compatibility` not provided." >> $GITHUB_STEP_SUMMARY + echo '[INFO]: Value for input `backwords_compatibility` not provided.' >> $GITHUB_STEP_SUMMARY echo "- Simply we assume user does not know/specify, and we do nothing about it." >> $GITHUB_STEP_SUMMARY fi echo BACKWORDS_COMPATIBILITY='' >> $GITHUB_ENV diff --git a/.readthedocs.yaml b/.readthedocs.yaml index cd3a27c..382714b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -16,6 +16,14 @@ build: # golang: "1.19" # ALL JOBS implied: https://docs.readthedocs.io/en/stable/builds.html + + # Step Customizable jobs + # Checkout post_checkout + # System dependencies pre_system_dependencies, post_system_dependencies + # Create environment pre_create_environment, post_create_environment + # Install pre_install, post_install + # Build pre_build, post_build + jobs: # post_system_dependencies: # - python3 -m pip install --user poetry diff --git a/docs/guides/gitops/run/guide_run_gitops_release_me_process.md b/docs/guides/gitops/run/guide_run_gitops_release_me_process.md index 481237c..29963f7 100644 --- a/docs/guides/gitops/run/guide_run_gitops_release_me_process.md +++ b/docs/guides/gitops/run/guide_run_gitops_release_me_process.md @@ -66,6 +66,16 @@ This is a `how-to` Guide, with everything you need, to "run" the 6. Fire-up a `auto-prod-` git tag event (ie `auto-prod-1.2.0`) + ```sh + export _SEM_VER=... + ``` + + ```sh + export _tag="auto-prod-${_SEM_VER}" + git tag -d "$_tag"; git push --delete origin "$_tag"; + git tag "$_tag" && git push origin "$_tag" + ``` + 7. If, you have setup `Human Approval`, give the Release a **green light**, by approving a Code Review. diff --git a/docs/guides/gitops/setup/guide_setup_gitops_release_me.md b/docs/guides/gitops/setup/guide_setup_gitops_release_me.md index a3da2cb..a0895d9 100644 --- a/docs/guides/gitops/setup/guide_setup_gitops_release_me.md +++ b/docs/guides/gitops/setup/guide_setup_gitops_release_me.md @@ -24,6 +24,15 @@ For more on *Phase 1* of this **Git Ops Process**, see the [*Release Me Phase 1* ## Prerequisites - a `github repository` + + +[//]: # (Code Write for calling merge GH API) +[//]: # (PR Write for creating PR, and possible labels) +[//]: # (Actions Write to allow triggering other Git Ops Workflows, on events this workflow fires) + - **Auto Merge** is ON, on Github Repository Settings ## Guide @@ -41,9 +50,9 @@ jobs: pr_to_release: uses: boromir674/automated-workflows/.github/workflows/go-pr-to-release.yml@fda3c758fa361c49e056977b1aeb0b2be01c99f1 # v1.6.1 with: - release_branch: ${{ "{{" }} vars.GIT_RELEASE_BRANCH || 'release' {{ "}}" }} + release_branch: ${{ vars.GIT_RELEASE_BRANCH || 'release' }} secrets: - github_pat: ${{ "{{" }} secrets.PR_RW_AND_ACTIONS_RW {{ "}}" }} + github_pat: ${{ secrets.GH_TOKEN_GITOPS_RELEASE_ME }} ``` {% endraw %} to automatically open **PR to release**, when `release-me` git tag events happen. @@ -67,10 +76,10 @@ jobs: ) uses: boromir674/automated-workflows/.github/workflows/go-pr-to-main.yml@fda3c758fa361c49e056977b1aeb0b2be01c99f1 # v1.6.1 with: - main_branch: ${{ "{{" }} vars.GIT_MAIN_BRANCH || 'main' {{ "}}" }} - release_branch: ${{ "{{" }} vars.GIT_RELEASE_BRANCH || 'release' {{ "}}" }} + main_branch: ${{ vars.GIT_MAIN_BRANCH || 'main' }} + release_branch: ${{ vars.GIT_RELEASE_BRANCH || 'release' }} secrets: - PR_RW_AND_ACTIONS_RW: '${{ "{{" }} secrets.PR_RW_AND_ACTIONS_RW {{ "}}" }}' + PR_RW_AND_ACTIONS_RW: '${{ secrets.GH_TOKEN_GITOPS_RELEASE_ME }}' ``` {% endraw %} to automatically open **PR to main**, when events satisfying all below conditions, happen: @@ -81,10 +90,11 @@ to automatically open **PR to main**, when events satisfying all below condition ### 3. Grant required Permissions to manipulate PRs and trigger Workflows 1. Create a **PAT**, scoped for your repository, bearing the `read/write` permission for: + - *Contents* - *Pull Requests* - *Actions* 2. Make PAT available to your repo as a `Repository Secret` - 1. Create **Repository Secret** with `name` `PR_RW_AND_ACTIONS_RW` + 1. Create **Repository Secret** with `name` `GH_TOKEN_GITOPS_RELEASE_ME` 2. Set **Repository Secret** `value` the **PAT** diff --git a/docs/index.md b/docs/index.md index 1f6f8ef..bef1ada 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,7 @@ # Automated Workflows -Implement `CI/CD` and `Git Ops`, with `Github Actions Reusable Workflows`. +Implement `CI/CD`{ title="Continuous Integration/Continuous Delivery" } and `Git Ops`, with `Github Actions Reusable Workflows`. + [![CI Status](https://img.shields.io/github/actions/workflow/status/boromir674/automated-workflows/cicd.yml?style=plastic&logo=github-actions&logoColor=lightblue&label=CI%20Tests&color=lightgreen&link=https%3A%2F%2Fgithub.com%2Fboromir674%2Fautomated-workflows%2Factions%2Fworkflows%2Fcicd.yml)](https://github.com/boromir674/automated-workflows/actions/workflows/cicd.yml) diff --git a/mkdocs.yml b/mkdocs.yml index d62caec..65b2585 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -24,6 +24,14 @@ theme: # - navigation.tracking # - navigation.instant + ### CSS DESIGN ### + # Allow writting css to a single css file, + # eg avoids need to add