Skip to content

Commit 807bf06

Browse files
authored
ci: use reusable ci v1 (#415)
* ci: use reusable ci v1 * fix: add correct license --------- Signed-off-by: Josef Andersson <josef.andersson@digg.se>
1 parent 3802f84 commit 807bf06

13 files changed

+168
-275
lines changed

.github/workflows/openssfscorecard.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
---
6+
name: OpenSSF Scorecard analysis
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
schedule:
13+
# Weekly on Thursdays at 01:30 UTC
14+
- cron: "30 1 * * 4"
15+
16+
permissions:
17+
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
18+
19+
jobs:
20+
scorecard-analysis:
21+
permissions:
22+
contents: read
23+
security-events: write
24+
id-token: write
25+
uses: diggsweden/reusable-ci/.github/workflows/security-openssf-scorecard.yml@v1

.github/workflows/pre-release-workflow.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/publish-image.yaml

Lines changed: 0 additions & 88 deletions
This file was deleted.

.github/workflows/publish-package.yaml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/pullrequest-workflow.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
---
6+
name: Pull Request Workflow
7+
8+
on:
9+
pull_request:
10+
branches:
11+
- main
12+
- develop
13+
- 'release/**'
14+
- 'feature/**'
15+
16+
permissions:
17+
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
18+
19+
jobs:
20+
pr-checks:
21+
uses: diggsweden/reusable-ci/.github/workflows/pullrequest-orchestrator.yml@v1
22+
secrets: inherit # Pass org-level secrets (NPM token if private packages)
23+
permissions:
24+
contents: read # Clone repository and read source code
25+
packages: read # Access private NPM packages from GitHub registry
26+
security-events: write # Upload ESLint/security findings to GitHub Security tab
27+
with:
28+
projectType: npm
29+
# MegaLinter is disabled for this project
30+
linters.megalint: false # Skip MegaLinter
31+
linters.publiccodelint: true
32+
33+
test:
34+
needs: [pr-checks]
35+
if: always() # Run tests even if linting fails (get full CI feedback)
36+
permissions:
37+
contents: read # Read test files and source code
38+
packages: read # Fetch test dependencies from registry
39+
uses: ./.github/workflows/test.yml
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
# Release Workflow Dev
6+
#
7+
# This workflow triggers the dev release orchestrator for development and feature branches.
8+
# It creates dev-tagged artifacts and container images for testing.
9+
#
10+
# Triggers:
11+
# - Push to dev/* or feat/* branches
12+
# - Manual workflow dispatch
13+
#
14+
# Created artifacts:
15+
# - Maven/NPM packages with -dev versions (e.g., 1.2.4-dev.1)
16+
# - Container images with dev tags
17+
# - See release summary for full details
18+
19+
name: Release Workflow Dev
20+
21+
on:
22+
push:
23+
branches:
24+
- 'dev/**'
25+
- 'feat/**'
26+
workflow_dispatch:
27+
28+
jobs:
29+
dev-release:
30+
permissions:
31+
contents: write # Read code and create version bump commits
32+
packages: write # Push dev images to ghcr.io
33+
uses: diggsweden/reusable-ci/.github/workflows/release-dev-orchestrator.yml@v1
34+
with:
35+
projectType: npm
36+
secrets: inherit

0 commit comments

Comments
 (0)