From 2cf004402221de640950e03ef750db2fc363ff60 Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Fri, 12 Apr 2024 18:41:11 -0600 Subject: [PATCH] Call dynamic README workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want to have a way to edit our README footer at one place and have the changes from there be propagated to our repos. By adding this snippet in the README, we call this reusable workflow: https://github.com/thoughtbot/templates/blob/main/.github/workflows/dynamic-readme.yaml that renders and updates the README footer dynamically. This workflow has been updated to accommodate repositories that have main branch rules. To generate the README dynamically, you’ll need to merge a PR with the README changes. That will trigger the GitHub workflow. The PR won’t be generated if the footer does not have any differences. It will only be open if there’s an update to the footer snippet. --- .github/workflows/dynamic-readme.yml | 19 +++++++++++++++++++ README.md | 17 +++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/dynamic-readme.yml diff --git a/.github/workflows/dynamic-readme.yml b/.github/workflows/dynamic-readme.yml new file mode 100644 index 00000000..78fd5862 --- /dev/null +++ b/.github/workflows/dynamic-readme.yml @@ -0,0 +1,19 @@ +name: update-templates + +on: + push: + branches: + - main + paths: + - README.md + workflow_dispatch: + +jobs: + update-templates: + permissions: + contents: write + pull-requests: write + pages: write + uses: thoughtbot/templates/.github/workflows/dynamic-readme.yaml@main + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 9eba4c09..bdce3e7f 100644 --- a/README.md +++ b/README.md @@ -491,21 +491,10 @@ For security issues it's better to contact (See +