From fd7c0ebf5a658403c60481c6fdca33d36b1e63c0 Mon Sep 17 00:00:00 2001 From: jakub-nt <175944085+jakub-nt@users.noreply.github.com> Date: Fri, 8 Aug 2025 15:59:35 +0200 Subject: [PATCH 1/2] Added a GitHub workflow to update the cfbs manual Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com> --- .github/workflows/update-cfbs-manual.yml | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/update-cfbs-manual.yml diff --git a/.github/workflows/update-cfbs-manual.yml b/.github/workflows/update-cfbs-manual.yml new file mode 100644 index 00000000..5e061256 --- /dev/null +++ b/.github/workflows/update-cfbs-manual.yml @@ -0,0 +1,54 @@ +name: Update cfbs manual + +on: + push: + branches: + - master + workflow_call: + workflow_dispatch: # Enables manual trigger + +jobs: + update_cfbs_manual: + name: Update cfbs manual + runs-on: ubuntu-24.04 + permissions: + contents: write + pull-requests: write + steps: + - name: Checks-out repository + uses: actions/checkout@v4 + with: + ref: "master" + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install argparse-manpage setuptools + - name: Set Git user + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + - name: Save manpage hash before + # ignore the first line as it contains the date and we don't want to update the manual if this is the only difference + run: | + echo "MANPAGE_HASH_BEFORE=$(tail -n +2 cfbs/cfbs.1 | sha256sum)">> $GITHUB_ENV + - name: Run manual generator + run: python3 cfbs/man_generator.py + - name: Save commit hash after + run: | + echo "MANPAGE_HASH_AFTER=$(tail -n +2 cfbs/cfbs.1 | sha256sum)">> $GITHUB_ENV + - name: Create Pull Request + if: env.MANPAGE_HASH_BEFORE != env.MANPAGE_HASH_AFTER + uses: cfengine/create-pull-request@v6 + with: + title: Updated cfbs manual + body: Automated updates to the cfbs manual using [the `update_cfbs_manual` workflow](https://github.com/cfengine/cfbs/blob/master/.github/workflows/update-cfbs-manual.yml). + reviewers: | + olehermanse + larsewi + craigcomstock + branch: update-manpage + branch-suffix: timestamp From 27a2d58e17b83a04afd28d423d536911979e1d57 Mon Sep 17 00:00:00 2001 From: jakub-nt <175944085+jakub-nt@users.noreply.github.com> Date: Wed, 13 Aug 2025 14:33:48 +0200 Subject: [PATCH 2/2] Added jakub-nt to reviewers list Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com> --- .github/workflows/update-cfbs-manual.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-cfbs-manual.yml b/.github/workflows/update-cfbs-manual.yml index 5e061256..f9693552 100644 --- a/.github/workflows/update-cfbs-manual.yml +++ b/.github/workflows/update-cfbs-manual.yml @@ -50,5 +50,6 @@ jobs: olehermanse larsewi craigcomstock + jakub-nt branch: update-manpage branch-suffix: timestamp