From ec0587c11ce29bbde3b85ec996303230c8dd448e Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Tue, 22 Jul 2025 14:46:37 +0200 Subject: [PATCH 1/2] Reformatted GH Actions yaml with prettier Signed-off-by: Ole Herman Schumacher Elgesem --- .github/workflows/markdowner.yml | 34 ++++++++++++++++---------------- .github/workflows/shellcheck.yml | 14 ++++++------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/markdowner.yml b/.github/workflows/markdowner.yml index 129e8cc4d..575d5e26c 100644 --- a/.github/workflows/markdowner.yml +++ b/.github/workflows/markdowner.yml @@ -2,26 +2,26 @@ name: Run markdowner.py on all markdown files and see if there are changes on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: check: runs-on: ubuntu-24.04 steps: - - name: Checks-out repository - uses: actions/checkout@v4 - - name: Set up Python 3.12 - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Run markdowner.py to (hopefully not) edit markdown files - run: | - find . -name '*.markdown' -type f -exec python3 .github/workflows/markdowner.py {} all \; | tee output.log - - name: Check output.log file for warnings - run: | - ! grep WARNING output.log - - name: Check if there are changes - run: | - git diff --exit-code + - name: Checks-out repository + uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Run markdowner.py to (hopefully not) edit markdown files + run: | + find . -name '*.markdown' -type f -exec python3 .github/workflows/markdowner.py {} all \; | tee output.log + - name: Check output.log file for warnings + run: | + ! grep WARNING output.log + - name: Check if there are changes + run: | + git diff --exit-code diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 13d2b53a2..c9f3c3d30 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -6,10 +6,10 @@ jobs: name: Run shellcheck on shell scripts runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Install dependencies - run: sudo apt-get update -y && sudo apt-get install -y shellcheck - - name: Run shellcheck - run: make check + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Install dependencies + run: sudo apt-get update -y && sudo apt-get install -y shellcheck + - name: Run shellcheck + run: make check From 7db8ceff7ad4bf75bb0e0478d3b7d78b64032386 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Tue, 22 Jul 2025 14:47:54 +0200 Subject: [PATCH 2/2] GH Actions: Set explicit permissions Signed-off-by: Ole Herman Schumacher Elgesem --- .github/workflows/markdowner.yml | 3 +++ .github/workflows/shellcheck.yml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/markdowner.yml b/.github/workflows/markdowner.yml index 575d5e26c..7d6df349f 100644 --- a/.github/workflows/markdowner.yml +++ b/.github/workflows/markdowner.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [master] +permissions: + contents: read + jobs: check: runs-on: ubuntu-24.04 diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index c9f3c3d30..0f40f4c27 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -1,6 +1,10 @@ name: Check all shell scripts + on: pull_request +permissions: + contents: read + jobs: shellcheck: name: Run shellcheck on shell scripts