-
Notifications
You must be signed in to change notification settings - Fork 0
chore: align CI files with develop (dependabot, pr-validation, publish) #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,20 @@ | ||
| version: 2 | ||
| updates: | ||
| # npm dependencies | ||
| - package-ecosystem: npm | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| day: monday | ||
| time: "03:00" | ||
| interval: monthly | ||
| open-pull-requests-limit: 1 | ||
| groups: | ||
| npm-dependencies: | ||
| patterns: | ||
| - "*" | ||
| assignees: | ||
| - CISCODE-MA/cloud-devops | ||
| - CISCODE-MA/devops | ||
| labels: | ||
| - "dependencies" | ||
| - "npm" | ||
| commit-message: | ||
| prefix: "chore(deps)" | ||
| include: "scope" | ||
| rebase-strategy: auto | ||
|
|
||
| # GitHub Actions | ||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| day: sunday | ||
| time: "03:00" | ||
| assignees: | ||
| - CISCODE-MA/cloud-devops | ||
| labels: | ||
| - "dependencies" | ||
| - "github-actions" | ||
| commit-message: | ||
| prefix: "ci(deps)" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,13 +9,8 @@ permissions: | |
|
|
||
| jobs: | ||
| validate: | ||
| name: CI - PR Validation (Node ${{ matrix.node-version }} / ${{ matrix.os }}) | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest] | ||
| node-version: [20, 22] | ||
| name: CI - PR Validation | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
|
|
@@ -24,7 +19,7 @@ jobs: | |
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| node-version: 22 | ||
| cache: npm | ||
|
Comment on lines
11
to
23
|
||
|
|
||
| - name: Install | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,56 +22,45 @@ jobs: | |||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Validate version tag and package.json | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| # Since develop→master may be a squash merge, look for the latest version tag anywhere in the repo | ||||||||||||||||||||||||||||||||||||||||
| # This handles both regular merges and squash merges | ||||||||||||||||||||||||||||||||||||||||
| TAG=$(git tag --list --sort=-version:refname 'v*.*.*' | head -1 || echo "") | ||||||||||||||||||||||||||||||||||||||||
| PKG_VERSION=$(grep '"version"' package.json | head -1 | sed 's/.*"version": "\([^"]*\)".*/\1/') | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
| PKG_VERSION=$(grep '"version"' package.json | head -1 | sed 's/.*"version": "\([^"]*\)".*/\1/') | |
| PKG_VERSION=$(jq -r '.version' package.json) |
Copilot
AI
Apr 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git rev-parse "$TAG" only verifies that the tag exists somewhere in the repo; it doesn’t ensure the workflow is building the commit that the tag points to. As written, a push to master could publish from an untagged commit as long as an old vX.Y.Z tag exists. Consider requiring the current HEAD to be exactly tagged (e.g., git describe --tags --exact-match) or verifying git rev-parse "$TAG" equals git rev-parse HEAD before publishing.
| echo "✅ package.json version: $PKG_VERSION" | |
| echo "✅ Tag $TAG exists in repo" | |
| TAG_COMMIT=$(git rev-parse "$TAG") | |
| HEAD_COMMIT=$(git rev-parse HEAD) | |
| if [[ "$TAG_COMMIT" != "$HEAD_COMMIT" ]]; then | |
| echo "❌ ERROR: Current HEAD does not match tag $TAG" | |
| echo "" | |
| echo "Details:" | |
| echo " HEAD commit: $HEAD_COMMIT" | |
| echo " $TAG commit: $TAG_COMMIT" | |
| echo "" | |
| echo "The master branch must point to the exact commit tagged with $TAG" | |
| echo "before publishing. Make sure you are building from the tagged commit." | |
| exit 1 | |
| fi | |
| echo "✅ package.json version: $PKG_VERSION" | |
| echo "✅ Tag $TAG exists in repo and matches HEAD" |
Copilot
AI
Apr 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TAG_VERSION is being set to the full tag string (e.g., v1.2.3) and doesn’t appear to be used elsewhere in this workflow. Either remove this environment export, or rename it to reflect it’s a tag (or export both TAG and a tag-less version) to avoid confusion for future edits.
| echo "TAG_VERSION=$TAG" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change removes Dependabot updates for
github-actions. Without a separate updater, action versions in workflows will no longer be kept current, which can miss security fixes and bugfixes. Consider re-adding agithub-actionsupdate entry (potentially grouped/limited similarly) if you still want automated workflow dependency maintenance.