Skip to content

Commit a15a764

Browse files
🪲 [Fix]: SHA used by linter should be docs commit (#16)
## Description - Fixed an issue where docs linter would check more than docs. - Fixed an issue where docs linter would fail due to SHA being that of the PR. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent b2fe12f commit a15a764

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/workflow.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,19 @@ jobs:
134134
needs: BuildModule
135135
runs-on: ubuntu-latest
136136
steps:
137-
- name: Checkout Code
138-
uses: actions/checkout@v4
139-
with:
140-
fetch-depth: 0
137+
- name: Init empty repository
138+
shell: pwsh
139+
run: |
140+
git init --initial-branch=main
141141
142142
- name: Download docs artifact
143143
uses: actions/download-artifact@v4
144144
with:
145145
name: docs
146146

147147
- name: Commit docs for linting
148+
id: commit-docs
149+
shell: pwsh
148150
run: |
149151
git config --global user.name "Github Actions"
150152
git config --global user.email "github-actions[bot]@users.noreply.github.com"
@@ -154,7 +156,11 @@ jobs:
154156
- name: Lint documentation
155157
uses: super-linter/super-linter/slim@latest
156158
env:
159+
DEFAULT_BRANCH: main
160+
DEFAULT_WORKSPACE: ${{ github.workspace }}
157161
GITHUB_TOKEN: ${{ github.token }}
162+
RUN_LOCAL: true # Running "locally" to avoid issues with GITHUB_SHA issue of a squash merge.
163+
ENABLE_GITHUB_ACTIONS_GROUP_TITLE: true
158164

159165
PublishModule:
160166
name: Publish module

0 commit comments

Comments
 (0)