Skip to content

Commit 9485123

Browse files
authored
Merge pull request #153 from TechnologyEnhancedLearning/ci-dependabot-setup
chore(dependabot): allow dependabot commit names
2 parents f7e9c78 + b6d18ca commit 9485123

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,8 @@ registries:
77
type: nuget-feed
88
# Dependabot needs access before it ignores, so still need to access TELBlazor despite ignoring it
99
url: https://nuget.pkg.github.com/TechnologyEnhancedLearning/index.json
10-
# not expected to work
1110
token: ${{ secrets.DEPENDABOT_GIT_PACKAGES_TOKEN }}
12-
# username: Phil-NHS
13-
# password: ${{ secrets.DEPENDABOT_GIT_PACKAGES_TOKEN }}
14-
15-
## password: ${{ secrets.NUGETKEY }}# No access to the secret as expected
16-
## username: kevwhitt-hee <- should be this really kevin made the pat
17-
## password: ${{ secrets.DEPENDABOT_GIT_PACKAGES_TOKEN }}
18-
## username: "kevin.whittaker"
19-
## qqqq del
20-
## username: "kevin.whittaker"
21-
# # Though we ignore the feed it will still need to know about it
22-
# # dependabot is more restrictive it needs a better key
23-
# # https://github.com/TechnologyEnhancedLearning/TELBlazor/network/updates
24-
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#adding-a-repository-secret-for-dependabot
25-
# token: ${{ secrets.NUGETKEY }}
11+
2612
updates:
2713
- package-ecosystem: "nuget"
2814
directory: "/"

.github/workflows/dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929

3030
dev-call-reusable-ci-checks-workflow:
3131
name: Dev Run CI checks
32+
# Not using @master so it uses its own check rules
3233
uses: ./.github/workflows/reuseable-ci-checks.yml
3334
with:
3435
runall: true

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
pull-request-call-reusable-ci-checks-workflow:
1616
name: Pull Request run CI Checks
17-
uses: ./.github/workflows/reuseable-ci-checks.yml
17+
uses: ./.github/workflows/reuseable-ci-checks.yml@master
1818
needs: dummy
1919
with:
2020
runall: true

.github/workflows/reuseable-ci-checks.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ jobs:
143143
status: ${{ job.status }}
144144
runs-on: ubuntu-latest
145145

146-
147-
148146
steps:
149147
# Checkout so can get access to the file
150148
- name: Checkout repository
@@ -207,11 +205,24 @@ jobs:
207205
outputs:
208206
status: ${{ job.status }}
209207
steps:
210-
- uses: actions/checkout@v4
208+
- name: Checkout repository
209+
uses: actions/checkout@v4
211210
with:
212211
fetch-depth: 0
213-
214-
- uses: wagoid/commitlint-github-action@v5
212+
213+
- name: Check branch and run commitlint
214+
run: |
215+
BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
216+
echo "Branch name: $BRANCH_NAME"
217+
if [[ "$BRANCH_NAME" =~ ^dependabot/ ]]; then
218+
echo "✅ Branch is a dependabot branch - skipping commitlint"
219+
exit 0
220+
else
221+
echo "Regular branch - will run commitlint in next step"
222+
fi
223+
224+
- name: Run commitlint action
225+
uses: wagoid/commitlint-github-action@v5
215226
with:
216227
configFile: .commitlintrc.json
217228
# Only set from/to if inputs are provided, otherwise let action use defaults

0 commit comments

Comments
 (0)