Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2be0d0d
chore(dependabot): releaserc to be used in checks and dependabot not …
Phil-NHS Aug 26, 2025
3256a8f
chore(reuseable): File loc error
Phil-NHS Aug 26, 2025
291579d
chore(dependabot): fix
Phil-NHS Aug 26, 2025
921837a
chore(dependancy): Not finding file
Phil-NHS Aug 26, 2025
a04553c
chore(release): check
Phil-NHS Aug 26, 2025
54bd5dc
chore(yaml): fix yaml
Phil-NHS Aug 26, 2025
b17b8a8
chore(punt): not hopefull but try completing nuget substitions
Phil-NHS Aug 26, 2025
31d9731
Merge pull request #123 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 26, 2025
c0a9f2f
chore(dependabot): no capitals dbot does need to manage telblazor on …
Phil-NHS Aug 26, 2025
70a2a68
Merge pull request #124 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 26, 2025
4371cef
chore(dependabot): ignore telblazor before fail
Phil-NHS Aug 26, 2025
68610bc
Merge pull request #125 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 26, 2025
6d4dd7a
chore(dependabot): specify registries
Phil-NHS Aug 27, 2025
ccda970
Merge pull request #126 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 27, 2025
d549b4e
chore(dependabot): try azure token dont have permission to make new d…
Phil-NHS Aug 27, 2025
2c45b3f
Merge pull request #127 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 27, 2025
8a85e19
chore(dependabot): meeting run
Phil-NHS Aug 27, 2025
5b4bea8
chore(dependabot): dependabot wasnt config compliant
Phil-NHS Aug 27, 2025
9553a8f
Merge pull request #128 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 27, 2025
267a538
chore(dependabot): dependabot token
Phil-NHS Aug 27, 2025
8448194
Merge pull request #129 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 27, 2025
3116c8f
chore(dependabot): just not authorising
Phil-NHS Aug 27, 2025
744eb3d
Merge pull request #130 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 27, 2025
6ca1dd1
chore(dependent): try something while reading
Phil-NHS Aug 27, 2025
f3d82e2
Merge pull request #131 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 27, 2025
b448be5
chore(dependabot): background spitfire
Phil-NHS Aug 27, 2025
5541643
Merge pull request #132 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 27, 2025
2c8c69a
chore(dependabot): surely not
Phil-NHS Aug 27, 2025
f7e9c78
Merge pull request #133 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 27, 2025
ad90562
chore(dependabot): allow dependabot commit names
Phil-NHS Aug 27, 2025
b6d18ca
chore(yaml): use most recent yaml where appropriate
Phil-NHS Aug 27, 2025
9485123
Merge pull request #153 from TechnologyEnhancedLearning/ci-dependabot…
Phil-NHS Aug 28, 2025
7a69c02
Merge pull request #157 from TechnologyEnhancedLearning/master
Phil-NHS Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
version: 2
registries:
nuget-org:
type: nuget-feed
url: https://api.nuget.org/v3/index.json
github-nuget-feed:
type: nuget-feed
# Dependabot needs access before it ignores, so still need to access TELBlazor despite ignoring it
url: https://nuget.pkg.github.com/TechnologyEnhancedLearning/index.json
token: ${{ secrets.DEPENDABOT_GIT_PACKAGES_TOKEN }}

updates:
- package-ecosystem: "nuget"
directory: "/"
registries:
- nuget-org
- github-nuget-feed
schedule:
interval: "daily"
open-pull-requests-limit: 100
target-branch: "Automatic_version_update_dependabot"

rebase-strategy: "auto"
ignore:
# The cicd for TELBlazor manages the version to consume for showcase consuming the package
- dependency-name: "TELBlazor.Components"
versions: ["*"]
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 100
target-branch: "Automatic_version_update_dependabot"


rebase-strategy: "auto"
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:

dev-call-reusable-ci-checks-workflow:
name: Dev Run CI checks
# Not using @master so it uses its own check rules
uses: ./.github/workflows/reuseable-ci-checks.yml
with:
runall: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

pull-request-call-reusable-ci-checks-workflow:
name: Pull Request run CI Checks
uses: ./.github/workflows/reuseable-ci-checks.yml
uses: ./.github/workflows/reuseable-ci-checks.yml@master
needs: dummy
with:
runall: true
Expand Down
68 changes: 62 additions & 6 deletions .github/workflows/reuseable-ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ env:
# Nuget Set Up
NUGET_PACKAGES_OUTPUT_PATH: ${{ github.workspace }}/CICDPackageLocation
LOCAL_PACKAGES_PATH: ${{ github.workspace }}/CICDPackageLocation
GITHUB_USERNAME: "Phil-NHS"

# Build Set Up
# May need coverlet.collector xplat if using the packaged version to test
Expand Down Expand Up @@ -79,6 +80,8 @@ jobs:
- name: Replace local environment variable in nuget config because cant provide it as a parameter
run: |
sed -i "s|%TEL_BLAZOR_PACKAGE_SOURCE%|$LOCAL_PACKAGES_PATH|g" nuget.config
sed -i "s|%GITHUB_USERNAME%|$GITHUB_USERNAME|g" nuget.config
sed -i "s|%TEL_GIT_PACKAGES_TOKEN%|$TEL_GIT_PACKAGES_TOKEN|g" nuget.config

- name: Create appsettings development from secrets
run: |
Expand Down Expand Up @@ -139,21 +142,59 @@ jobs:
outputs:
status: ${{ job.status }}
runs-on: ubuntu-latest

steps:
# Checkout so can get access to the file
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate Branch Name
run: |

#BRANCH_NAME="${GITHUB_HEAD_REF}"
BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
echo "Validating branch name: $BRANCH_NAME"

# Read allowed branch patterns from .releaserc.json
RELEASERC_PATH="${{ github.workspace }}/.releaserc.json"
echo "Using releaserc at: $RELEASERC_PATH"
ALLOWED_BRANCHES=$(jq -r '.branches[].name' $RELEASERC_PATH)

VALID=false
for pattern in $ALLOWED_BRANCHES; do
# Convert wildcard * into regex
REGEX="^${pattern//\*/.*}$"
if [[ "$BRANCH_NAME" =~ $REGEX ]]; then
VALID=true
break
fi
done

# Always allow dependabot branches for CI
# Semver will ignore the branch but will bump the collected dependabot changes branch
if [[ "$BRANCH_NAME" =~ ^dependabot/ ]]; then
echo "✅ Branch is a dependabot branch its not for release or versioning but for merging into the dependabot collection branch"
VALID=true
fi

if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]]; then
if [ "$VALID" = true ]; then
echo "✅ Branch name is valid"
else
echo "❌ Invalid branch name: $BRANCH_NAME"
echo "Branch names must follow one of the allowed prefixes:"
echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*"
echo "Allowed branch patterns:"
echo "$ALLOWED_BRANCHES"
exit 1
fi

# qqqq drop
# if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]]; then
# echo "✅ Branch name is valid"
# else
# echo "❌ Invalid branch name: $BRANCH_NAME"
# echo "Branch names must follow one of the allowed prefixes:"
# echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*"
# exit 1
# fi


reuseable-ci-checks-commitlint:
Expand All @@ -164,11 +205,24 @@ jobs:
outputs:
status: ${{ job.status }}
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: wagoid/commitlint-github-action@v5

- name: Check branch and run commitlint
run: |
BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
echo "Branch name: $BRANCH_NAME"
if [[ "$BRANCH_NAME" =~ ^dependabot/ ]]; then
echo "✅ Branch is a dependabot branch - skipping commitlint"
exit 0
else
echo "Regular branch - will run commitlint in next step"
fi

- name: Run commitlint action
uses: wagoid/commitlint-github-action@v5
with:
configFile: .commitlintrc.json
# Only set from/to if inputs are provided, otherwise let action use defaults
Expand Down Expand Up @@ -200,6 +254,8 @@ jobs:
- name: Replace local environment variable in nuget config because cant provide it as a parameter
run: |
sed -i "s|%TEL_BLAZOR_PACKAGE_SOURCE%|$LOCAL_PACKAGES_PATH|g" nuget.config
sed -i "s|%GITHUB_USERNAME%|$GITHUB_USERNAME|g" nuget.config
sed -i "s|%TEL_GIT_PACKAGES_TOKEN%|$TEL_GIT_PACKAGES_TOKEN|g" nuget.config

- name: Clean lock files because the newly generated package file will superseed the locks
run: |
Expand Down
4 changes: 2 additions & 2 deletions nuget.config.cicd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--

This config is replaces nuget.config in cicd.
It provides credentials incase the TEL git packages feed is used.
This config is replaces nuget.config in cicd.
It provides credentials incase the TEL git packages feed is used.

-->
<configuration>
Expand Down
Loading