Skip to content

Commit fb11ff2

Browse files
committed
ci: use reusable-ci v1
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
1 parent acb0784 commit fb11ff2

File tree

6 files changed

+110
-243
lines changed

6 files changed

+110
-243
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: 2025 diggsweden/wallet-provider
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 Sundays at 01:30 UTC
14+
- cron: "30 1 * * 0"
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/pullrequest-workflow.yml

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,36 @@
66
name: Pull Request Workflow
77

88
on:
9-
push:
10-
branches:
11-
- main
129
pull_request:
1310
branches:
1411
- main
12+
- develop
13+
- "release/**"
14+
- "feature/**"
1515

1616
permissions:
17-
contents: read
17+
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
1818

1919
concurrency:
2020
group: ${{ github.workflow }}-${{ github.ref }}
2121
cancel-in-progress: true
2222

2323
jobs:
24-
commitlint:
25-
uses: diggsweden/.github/.github/workflows/commit-lint.yml@main
26-
# dependencyreviewlint:
27-
# uses: diggsweden/.github/.github/workflows/dependency-review.yml@main
28-
# # Disabled: requires GitHub Advanced Security ($19/month for private repos)
29-
licenselint:
30-
uses: diggsweden/.github/.github/workflows/license-lint.yml@main
31-
misclint:
24+
pr-checks:
25+
uses: diggsweden/reusable-ci/.github/workflows/pullrequest-orchestrator.yml@v1
26+
secrets: inherit # Pass org-level secrets (for private Maven dependencies)
3227
permissions:
33-
contents: read
34-
security-events: write
35-
uses: diggsweden/.github/.github/workflows/megalint.yml@main
28+
contents: read # Clone repository and read source code
29+
packages: read # Access GitHub Packages for Maven dependencies
30+
security-events: write # Upload SpotBugs/dependency check results to Security tab
31+
with:
32+
projectType: maven
33+
linters.dependencyreview: false # Disabled: requires GitHub Advanced Security
34+
3635
test:
36+
needs: [pr-checks]
37+
if: always() # Run tests even if linting fails (get complete feedback)
3738
permissions:
38-
contents: read
39-
if: always()
40-
needs: [licenselint, commitlint, misclint]
39+
contents: read # Access test resources and source code
40+
packages: read # Fetch test dependencies from GitHub Packages
4141
uses: ./.github/workflows/test.yml
42-
build-image:
43-
permissions:
44-
contents: read
45-
packages: write
46-
id-token: write # Required for SLSA provenance
47-
actions: read # Required for SLSA provenance v2
48-
if: always()
49-
needs: [licenselint, commitlint, misclint, test]
50-
uses: ./.github/workflows/release-publish.yml
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-FileCopyrightText: 2025 diggsweden/wallet-provider
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+
# - Container images with dev tags
16+
# - See release summary for full details
17+
18+
name: Release Workflow Dev
19+
20+
on:
21+
workflow_dispatch:
22+
23+
jobs:
24+
dev-release:
25+
permissions:
26+
contents: read # Read code for building
27+
packages: write # Push dev images to ghcr.io
28+
uses: diggsweden/reusable-ci/.github/workflows/release-dev-orchestrator.yml@v1
29+
with:
30+
projectType: maven
31+
containerfile: "Containerfile"
32+
secrets: inherit

.github/workflows/release-publish.yml

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

.github/workflows/release-workflow.yml

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,51 @@
22
#
33
# SPDX-License-Identifier: CC0-1.0
44

5+
# Release Workflow for wallet-provider
6+
# Maven application with container image publishing
7+
---
58
name: Release Workflow
69

710
on:
811
push:
912
tags:
10-
- "v[0-9]*.[0-9]*" # Forces at least vX.Y and then allows anything after
13+
- "v[0-9]+.[0-9]+.[0-9]+" # Stable: v1.0.0
14+
- "v[0-9]+.[0-9]+.[0-9]+-alpha*" # Alpha: v1.0.0-alpha.1
15+
- "v[0-9]+.[0-9]+.[0-9]+-beta*" # Beta: v1.0.0-beta.1
16+
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # RC: v1.0.0-rc.1
17+
18+
concurrency:
19+
group: release-${{ github.ref }}
20+
cancel-in-progress: false # Queue releases, don't cancel partial releases
1121

1222
permissions:
13-
contents: read
23+
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
1424

1525
jobs:
16-
version-bump:
17-
secrets: inherit
26+
release:
27+
uses: diggsweden/reusable-ci/.github/workflows/release-orchestrator.yml@v1
1828
permissions:
19-
contents: write
20-
packages: read
21-
uses: diggsweden/.github/.github/workflows/version-bump-changelog.yml@main
29+
contents: write # Create GitHub releases and tags
30+
packages: write # Publish JARs to GitHub Packages and images to ghcr.io
31+
id-token: write # Generate OIDC token for SLSA provenance attestation
32+
actions: read # Read workflow runs for SLSA provenance generation
33+
security-events: write # Upload vulnerability scan results from container scanning
34+
attestations: write # Attach SBOM attestation to container images
35+
secrets: inherit # Use org-level GPG keys, Maven credentials if configured
2236
with:
23-
updatePom: true
24-
file_pattern: pom.xml CHANGELOG.md
37+
# Project configuration
38+
projectType: maven # Build system type (determines version file location)
2539

26-
publish:
27-
needs: [version-bump]
28-
permissions:
29-
contents: read
30-
packages: write
31-
id-token: write # Required for SLSA provenance
32-
actions: read # Required for SLSA provenance v2
33-
uses: ./.github/workflows/release-publish.yml
40+
# Artifact publisher configuration
41+
artifactPublisher: maven-app-github # Publishes JAR to GitHub Packages
3442

35-
release:
36-
needs: [publish]
37-
permissions:
38-
contents: write
39-
packages: write
40-
id-token: write
41-
secrets: inherit
42-
uses: ./.github/workflows/release.yml
43+
# Container builder configuration
44+
containerBuilder: containerimage-ghcr # Build and push Docker image to ghcr.io
45+
container.platforms: "linux/amd64,linux/arm64" # Multi-arch support for Intel and ARM
46+
container.containerfile: "Containerfile" # Container build file
47+
48+
# Changelog configuration
49+
changelogCreator: git-cliff # Generate changelog from conventional commits
50+
51+
# Release publisher configuration
52+
releasePublisher: github-cli # Creates GitHub release with changelog and artifacts

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)