From 9e6c0818a38c40f0a870ca5ad88a9613f6f185fd Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Wed, 29 Jan 2025 17:27:44 +0100 Subject: [PATCH 01/24] Move actions to lhm_actions --- .github/actions/action-build-docs/action.yml | 53 +++++++++++ .github/actions/action-build-image/action.yml | 64 +++++++++++++ .github/actions/action-checkout/action.yml | 8 ++ .github/actions/action-codeql/action.yml | 54 +++++++++++ .../action-create-github-release/action.yml | 32 +++++++ .github/actions/action-deploy-docs/action.yml | 23 +++++ .github/actions/action-maven-build/action.yml | 41 +++++++++ .../actions/action-maven-release/action.yml | 91 +++++++++++++++++++ .github/actions/action-npm-build/action.yml | 56 ++++++++++++ .github/actions/action-npm-release/action.yml | 72 +++++++++++++++ 10 files changed, 494 insertions(+) create mode 100644 .github/actions/action-build-docs/action.yml create mode 100644 .github/actions/action-build-image/action.yml create mode 100644 .github/actions/action-checkout/action.yml create mode 100644 .github/actions/action-codeql/action.yml create mode 100644 .github/actions/action-create-github-release/action.yml create mode 100644 .github/actions/action-deploy-docs/action.yml create mode 100644 .github/actions/action-maven-build/action.yml create mode 100644 .github/actions/action-maven-release/action.yml create mode 100644 .github/actions/action-npm-build/action.yml create mode 100644 .github/actions/action-npm-release/action.yml diff --git a/.github/actions/action-build-docs/action.yml b/.github/actions/action-build-docs/action.yml new file mode 100644 index 0000000..348c8e7 --- /dev/null +++ b/.github/actions/action-build-docs/action.yml @@ -0,0 +1,53 @@ +# https://vitepress.dev/guide/deploy#github-pages +name: Build docs + +inputs: + docs-path: + required: false + default: "./docs" + type: string + description: Path to vitepress docs project + node-version: + required: false + default: "22" + type: string + description: Node version + build-cmd: + required: false + default: "build" + type: string + description: Change build command, if using vuepress + dist-path: + required: false + default: ".vitepress/dist" + type: string + description: Vitepress output path, which should be uploaded to github pages + +runs: + using: "composite" + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 # Required for vitepress lastUpdated + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version: ${{ inputs.node-version }} + cache: npm + cache-dependency-path: "${{ inputs.docs-path }}/package-lock.json" + - name: Setup Pages + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 + - name: Install dependencies + run: npm --prefix ./${{inputs.docs-path }} ci + shell: bash + - name: Run lint + run: npm run --prefix ./${{inputs.docs-path}} lint + shell: bash + - name: Build with VitePress + run: npm --prefix ./${{inputs.docs-path }} run ${{ inputs.build-cmd }} + shell: bash + - name: Upload artifact + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + with: + path: ${{ inputs.docs-path }}/${{ inputs.dist-path }} diff --git a/.github/actions/action-build-image/action.yml b/.github/actions/action-build-image/action.yml new file mode 100644 index 0000000..85bbcfb --- /dev/null +++ b/.github/actions/action-build-image/action.yml @@ -0,0 +1,64 @@ +name: "Build Docker Image" +description: "Builds and pushes a docker image" + +inputs: + registry: + description: "Image registry to push image to" + required: true + default: ghcr.io + registry-username: + description: "Username to authenticate against image registry" + required: true + registry-password: + description: "Username to authenticate against image registry" + required: true + image-tags: + description: "Tags to tag image with" + required: false + default: | + type=raw,value=latest + image-labels: + description: "Labels to add to image" + required: false + default: | + org.opencontainers.image.description=See ${{ github.server_url }}/${{ github.repository }} + path: + description: "Path to the Dockerfile to build image from" + required: true + image-name: + description: "Name to give the image" + required: true + artifact-name: + description: "name where you download artifact" + required: true + +runs: + using: "composite" + steps: + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Download a single artifact + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: ${{ inputs.artifact-name }} + - name: Login to Registry + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: ${{ inputs.registry }} + username: ${{ inputs.registry-username }} + password: ${{ inputs.registry-password }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1 + with: + images: "${{ inputs.registry }}/${{ github.repository }}/${{ inputs.image-name }}" + tags: ${{inputs.image-tags}} + labels: ${{inputs.image-labels}} + - name: Build and push image + uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0 + with: + context: ./${{ inputs.path }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/actions/action-checkout/action.yml b/.github/actions/action-checkout/action.yml new file mode 100644 index 0000000..ee34046 --- /dev/null +++ b/.github/actions/action-checkout/action.yml @@ -0,0 +1,8 @@ +name: "Checkout Code" +description: "A wrapper for actions/checkout with no args" + +runs: + using: "composite" + steps: + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/actions/action-codeql/action.yml b/.github/actions/action-codeql/action.yml new file mode 100644 index 0000000..a695f21 --- /dev/null +++ b/.github/actions/action-codeql/action.yml @@ -0,0 +1,54 @@ +name: "Advanced CodeQL action" +description: "Scans a repository using provided CodeQL language, buildmode and query scan set" + +inputs: + codeql-language: + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#changing-the-languages-that-are-analyzed + description: "CodeQL language name to scan with (e.g java-kotlin, javascript-typescript, python, ...)" + required: true + codeql-buildmode: + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes + description: "Build mode to use when scanning the source code (e.g. none, autobuild, manual)" + required: false + default: "none" + codeql-query: + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#using-queries-in-ql-packs + description: "Query set to use when analyzing the source code (e.g. default, security-extended, security-and-quality)" + required: false + default: "security-and-quality" + java-version: + default: "21" + type: string + description: Temurin JDK version to use for autobuild (only when codeql-language is java-kotlin and codeql-build is set to autobuild) + path: + description: "Path to scan files in" + required: false + default: "." +runs: + using: "composite" + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up JDK + if: inputs.codeql-language == 'java-kotlin' && inputs.codeql-buildmode == 'autobuild' + uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 + with: + java-version: ${{ inputs.java-version }} + distribution: "temurin" + cache: "maven" + cache-dependency-path: "${{ inputs.path }}/pom.xml" + - name: Initialize CodeQL for ${{ inputs.codeql-language }} + uses: github/codeql-action/init@v3 + with: + languages: ${{ inputs.codeql-language }} + build-mode: ${{ inputs.codeql-buildmode }} + queries: ${{ inputs.codeql-query }} + - if: inputs.codeql-buildmode == 'autobuild' + name: Build using Autobuild + uses: github/codeql-action/autobuild@v3 + with: + working-directory: ${{ inputs.path }} + - name: Perform CodeQL analysis for ${{ inputs.codeql-language }} + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ inputs.codeql-language }}-/path:${{ inputs.path }}" diff --git a/.github/actions/action-create-github-release/action.yml b/.github/actions/action-create-github-release/action.yml new file mode 100644 index 0000000..346c9b7 --- /dev/null +++ b/.github/actions/action-create-github-release/action.yml @@ -0,0 +1,32 @@ +name: Create GitHub Release +description: "Creates a GitHub Release of a Maven Artifact" +inputs: + artifact-name: + required: true + type: string + description: "name of the artifact to download" + tag-name: + required: true + type: string + description: "Name of a tag (e.g. sps-1.0.0 or myproject-1.0.0" + artifact-path: + required: true + type: string + description: "path to the artifacts (e.g. ./target/*.jar)" +runs: + using: "composite" + steps: + - name: Download a single artifact + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: ${{inputs.artifact-name}} + - name: Create GitHub Release + id: create_release + uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 + with: + tag_name: ${{inputs.tag-name}} + draft: false + prerelease: false + generate_release_notes: false + files: | + ${{inputs.artifact-path}} diff --git a/.github/actions/action-deploy-docs/action.yml b/.github/actions/action-deploy-docs/action.yml new file mode 100644 index 0000000..727a3a6 --- /dev/null +++ b/.github/actions/action-deploy-docs/action.yml @@ -0,0 +1,23 @@ +name: Deploy docs +inputs: + artifact_name: + description: "The name of the artifact to deploy" + default: "github-pages" + required: false + type: string + deploy-branch: + required: false + type: string + default: 'main' + description: "Branch to deploy documentation from" + +# Deployment job +runs: + using: "composite" + steps: + - name: Deploy to GitHub Pages + id: deployment + if: (github.ref_name == inputs.deploy-branch) + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 + with: + artifact_name: ${{ inputs.artifact_name }} diff --git a/.github/actions/action-maven-build/action.yml b/.github/actions/action-maven-build/action.yml new file mode 100644 index 0000000..4feff77 --- /dev/null +++ b/.github/actions/action-maven-build/action.yml @@ -0,0 +1,41 @@ +name: Compliance check and build test + +inputs: + java-version: + required: false + default: 21 + type: string + description: set the java version + app-path: + required: true + type: string + description: path to the pom.xml +outputs: + artifact-name: + description: "name of the artifact upload" + value: ${{steps.artifact-name.outputs.artifact-name}} +runs: + + using: "composite" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up JDK + uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 + with: + java-version: ${{ inputs.java-version }} + distribution: "temurin" + cache: "maven" + cache-dependency-path: "./${{inputs.app-path}}/pom.xml" + - name: Build with Maven + run: mvn --update-snapshots -f ./${{inputs.app-path}}/pom.xml install + shell: bash + - id: artifact-name + run: echo "artifact-name=${{hashFiles(format('./{0}/pom.xml', inputs.app-path))}}" >> "$GITHUB_OUTPUT" + shell: bash + - id: upload-artifact + name: "Upload Artifact" + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + with: + name: ${{steps.artifact-name.outputs.artifact-name}} + path: "**/target" + retention-days: 5 diff --git a/.github/actions/action-maven-release/action.yml b/.github/actions/action-maven-release/action.yml new file mode 100644 index 0000000..5437520 --- /dev/null +++ b/.github/actions/action-maven-release/action.yml @@ -0,0 +1,91 @@ +name: Maven Release + +inputs: + java-version: + required: false + default: 21 + type: string + description: configure the java version + app-path: + required: true + type: string + description: path where the pom.xml is + releaseVersion: + required: true + type: string + description: version which will be released + developmentVersion: + required: true + type: string + description: next version with snapshot + skipDeployment: + default: true + type: boolean + description: skip deployment to maven central + SIGN_KEY_PASS: + required: true + type: string + description: env variable for GPG private key passphrase + CENTRAL_USERNAME: + required: true + type: string + description: env variable for username in deploy + CENTRAL_PASSWORD: + required: true + type: string + description: env variable for token in deploy + GDP_PRIVATE_KEY: + required: true + type: string + description: Value of the GPG private key to import + +outputs: + MVN_ARTIFACT_ID: + description: "artifact name from pom" + value: ${{ steps.maven-release-step.outputs.MVN_ARTIFACT_ID }} + artifact-name: + description: "name of the artifact upload" + value: ${{steps.artifact-name.outputs.artifact-name}} + +runs: + using: "composite" + steps: + # Checkout source code, set up Java, etc. Then... + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up JDK + uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 + with: + java-version: ${{ inputs.java-version }} + distribution: "temurin" + cache: "maven" + cache-dependency-path: ".${{ inputs.app-path}}/pom.xml" + server-id: "central" + server-username: ${{ inputs.CENTRAL_USERNAME }} + server-password: ${{ inputs.CENTRAL_PASSWORD }} + gpg-private-key: ${{ inputs.GDP_PRIVATE_KEY }} + gpg-passphrase: ${{ inputs.SIGN_KEY_PASS }} + - name: Maven Release Step + id: maven-release-step + shell: bash + run: | + git config --global user.email "github-actions@github.com" + git config --global user.name "GitHub Actions" + MVN_ARTIFACT_ID=$(mvn -f .${{inputs.app-path}}/pom.xml org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.artifactId -q -DforceStdout) + echo $MVN_ARTIFACT_ID + echo "MVN_ARTIFACT_ID=$MVN_ARTIFACT_ID" >> $GITHUB_OUTPUT + mvn release:prepare release:perform -f .${{inputs.app-path}}/pom.xml -B -DreleaseVersion=${{ inputs.releaseVersion }} -DdevelopmentVersion=${{ inputs.developmentVersion }} -Darguments="-Dmaven.deploy.skip=${{ inputs.skipDeployment }}" + env: + SIGN_KEY_PASS: ${{ inputs.GDP_PRIVATE_KEY }} + CENTRAL_USERNAME: ${{ inputs.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ inputs.CENTRAL_PASSWORD }} + + - id: artifact-name + run: echo "artifact-name=${{hashFiles(format('./{0}/pom.xml', inputs.app-path))}}" >> "$GITHUB_OUTPUT" + shell: bash + - name: "Upload Artifact" + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + with: + name: ${{steps.artifact-name.outputs.artifact-name}} + path: "**/target" + retention-days: 5 diff --git a/.github/actions/action-npm-build/action.yml b/.github/actions/action-npm-build/action.yml new file mode 100644 index 0000000..3dca7cd --- /dev/null +++ b/.github/actions/action-npm-build/action.yml @@ -0,0 +1,56 @@ +name: Compliance check and build test +inputs: + node-version: + required: false + default: "22.11.0" + type: string + description: node version + app-path: + required: true + type: string + description: path where the package.json is located + run-lint: + required: false + default: 'true' + description: Controls the execution of the 'npm run lint' script + run-test: + required: false + default: 'true' + description: Controls the execution of the 'npm run test' script +outputs: + artifact-name: + description: "name of the artifact upload" + value: ${{steps.artifact-name.outputs.artifact-name}} +runs: + using: "composite" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up Node.js + uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version: ${{ inputs.node-version }} + cache: "npm" + cache-dependency-path: "./${{inputs.app-path}}/package-lock.json" + - name: Install dependencies + run: npm --prefix ./${{inputs.app-path}} ci + shell: bash + - name: Run lint + if: ${{ inputs.run-lint == 'true' }} + run: npm run --prefix ./${{inputs.app-path}} lint + shell: bash + - name: Run test + if: ${{ inputs.run-test == 'true' }} + run: npm run --prefix ./${{inputs.app-path}} test + shell: bash + - name: Run build + run: npm run --prefix ./${{inputs.app-path}} build + shell: bash + - id: artifact-name + run: echo "artifact-name=${{hashFiles(format('./{0}/package.json', inputs.app-path))}}" >> "$GITHUB_OUTPUT" + shell: bash + - name: "Upload Artifact" + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + with: + name: ${{steps.artifact-name.outputs.artifact-name}} + path: "**/dist" + retention-days: 5 diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml new file mode 100644 index 0000000..b2a8c5a --- /dev/null +++ b/.github/actions/action-npm-release/action.yml @@ -0,0 +1,72 @@ +name: Npm Release + +inputs: + node-version: + required: false + default: "22.11.0" + type: string + description: node version + app-path: + required: true + type: string + description: path where the package.json is located + releaseVersion: + type: choice + description: "Select version increment type (follows Semantic Versioning)" + required: true + options: + - patch + - minor + - major + skip-deployment: + default: true + type: boolean + description: skip deployment to npm registry + npm-token: + type: string + required: true + description: npm token for release + +outputs: + ARTIFACT_NAME: + description: "artifact name from job artifact" + value: ${{ steps.node.outputs.artifact-name }} + ARTIFACT_VERSION: + description: "version of the artifact upload" + value: ${{steps.node-release.outputs.VERSION}} + +runs: + using: "composite" + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up Node.js + uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version: "${{ inputs.node-version }}" + registry-url: 'https://registry.npmjs.org' + cache: "npm" + cache-dependency-path: "./${{inputs.app-path}}/package-lock.json" + - id: node-release + name: Bump version and create git tag + working-directory: ./${{inputs.app-path}} + run: | + NEW_VERSION=$(npm version ${{inputs.releaseVersion}}) || exit 1 + echo "VERSION=$NEW_VERSION" >> "$GITHUB_OUTPUT" + git config --global user.email "github-actions@github.com" + git config --global user.name "GitHub Actions" + git add package.json package-lock.json + git commit -m "Bump version to ${NEW_VERSION}" || exit 1 + git tag "${NEW_VERSION}" || exit 1 + git push && git push --tags || exit 1 + shell: bash + - id: node + uses: it-at-m/.github/.github/actions/action-npm-build@main + with: + app-path: "${{ inputs.app-path }}" + - if: "${{ !inputs.skip-deployment }}" + shell: bash + working-directory: ./${{inputs.app-path}} + run: npm --prefix ./${{ inputs.app-path }} publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ inputs.npm-token }} # Centralized token in it-at-m GitHub organization From 013f4568aa67bf6711049ee0c1696b5932441d46 Mon Sep 17 00:00:00 2001 From: Hans <11695964+hupling@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:54:36 +0100 Subject: [PATCH 02/24] Update CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 766872d..beb1624 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -52,7 +52,7 @@ decisions when appropriate. This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, +Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. From 2ad8f06b31445c3d9a9a95d2102693e2b4af88b3 Mon Sep 17 00:00:00 2001 From: Hans <11695964+hupling@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:55:04 +0100 Subject: [PATCH 03/24] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5560231..8a164e5 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ We provide actions to Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. -If you have a suggestion that would make this better, please open an issue with the tag "enhancement", fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". +If you have a suggestion that would make this better, please open an issue with the tag "enhancement", fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again! 1. Open an issue with the tag "enhancement" From 3c4d8af438c4a92cb36cfe0325479dea571614e6 Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Thu, 6 Feb 2025 15:18:15 +0100 Subject: [PATCH 04/24] Copy workflows/deploy-pages.yaml to lhm_actions, action changes of .github copied to lhm_actions --- .github/actions/action-codeql/action.yml | 4 +- .github/actions/action-maven-build/action.yml | 12 +-- .../actions/action-maven-release/action.yml | 44 +++++------ .github/workflows/deploy-pages.yaml | 79 +++++++++++++++++++ 4 files changed, 109 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/deploy-pages.yaml diff --git a/.github/actions/action-codeql/action.yml b/.github/actions/action-codeql/action.yml index a695f21..22d04d5 100644 --- a/.github/actions/action-codeql/action.yml +++ b/.github/actions/action-codeql/action.yml @@ -31,7 +31,7 @@ runs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up JDK if: inputs.codeql-language == 'java-kotlin' && inputs.codeql-buildmode == 'autobuild' - uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 + uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 with: java-version: ${{ inputs.java-version }} distribution: "temurin" @@ -51,4 +51,4 @@ runs: - name: Perform CodeQL analysis for ${{ inputs.codeql-language }} uses: github/codeql-action/analyze@v3 with: - category: "/language:${{ inputs.codeql-language }}-/path:${{ inputs.path }}" + category: "/language:${{ inputs.codeql-language }}-/path:${{ inputs.path }}" \ No newline at end of file diff --git a/.github/actions/action-maven-build/action.yml b/.github/actions/action-maven-build/action.yml index 4feff77..49e7ae9 100644 --- a/.github/actions/action-maven-build/action.yml +++ b/.github/actions/action-maven-build/action.yml @@ -10,17 +10,17 @@ inputs: required: true type: string description: path to the pom.xml -outputs: - artifact-name: - description: "name of the artifact upload" - value: ${{steps.artifact-name.outputs.artifact-name}} +outputs: + artifact-name: + description: "name of the artifact upload" + value: ${{steps.artifact-name.outputs.artifact-name}} runs: using: "composite" steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up JDK - uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 + uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 with: java-version: ${{ inputs.java-version }} distribution: "temurin" @@ -38,4 +38,4 @@ runs: with: name: ${{steps.artifact-name.outputs.artifact-name}} path: "**/target" - retention-days: 5 + retention-days: 5 \ No newline at end of file diff --git a/.github/actions/action-maven-release/action.yml b/.github/actions/action-maven-release/action.yml index 5437520..c7e162a 100644 --- a/.github/actions/action-maven-release/action.yml +++ b/.github/actions/action-maven-release/action.yml @@ -19,33 +19,33 @@ inputs: type: string description: next version with snapshot skipDeployment: - default: true - type: boolean - description: skip deployment to maven central + default: true + type: boolean + description: skip deployment to maven central SIGN_KEY_PASS: - required: true - type: string - description: env variable for GPG private key passphrase + required: true + type: string + description: env variable for GPG private key passphrase CENTRAL_USERNAME: - required: true - type: string - description: env variable for username in deploy + required: true + type: string + description: env variable for username in deploy CENTRAL_PASSWORD: - required: true - type: string - description: env variable for token in deploy + required: true + type: string + description: env variable for token in deploy GDP_PRIVATE_KEY: required: true type: string description: Value of the GPG private key to import - + outputs: MVN_ARTIFACT_ID: description: "artifact name from pom" value: ${{ steps.maven-release-step.outputs.MVN_ARTIFACT_ID }} - artifact-name: - description: "name of the artifact upload" - value: ${{steps.artifact-name.outputs.artifact-name}} + artifact-name: + description: "name of the artifact upload" + value: ${{steps.artifact-name.outputs.artifact-name}} runs: using: "composite" @@ -54,7 +54,7 @@ runs: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up JDK - uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 + uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 with: java-version: ${{ inputs.java-version }} distribution: "temurin" @@ -76,16 +76,16 @@ runs: echo "MVN_ARTIFACT_ID=$MVN_ARTIFACT_ID" >> $GITHUB_OUTPUT mvn release:prepare release:perform -f .${{inputs.app-path}}/pom.xml -B -DreleaseVersion=${{ inputs.releaseVersion }} -DdevelopmentVersion=${{ inputs.developmentVersion }} -Darguments="-Dmaven.deploy.skip=${{ inputs.skipDeployment }}" env: - SIGN_KEY_PASS: ${{ inputs.GDP_PRIVATE_KEY }} - CENTRAL_USERNAME: ${{ inputs.CENTRAL_USERNAME }} - CENTRAL_PASSWORD: ${{ inputs.CENTRAL_PASSWORD }} + SIGN_KEY_PASS: ${{ inputs.GDP_PRIVATE_KEY }} + CENTRAL_USERNAME: ${{ inputs.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ inputs.CENTRAL_PASSWORD }} - id: artifact-name run: echo "artifact-name=${{hashFiles(format('./{0}/pom.xml', inputs.app-path))}}" >> "$GITHUB_OUTPUT" - shell: bash + shell: bash - name: "Upload Artifact" uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: ${{steps.artifact-name.outputs.artifact-name}} path: "**/target" - retention-days: 5 + retention-days: 5 \ No newline at end of file diff --git a/.github/workflows/deploy-pages.yaml b/.github/workflows/deploy-pages.yaml new file mode 100644 index 0000000..5385364 --- /dev/null +++ b/.github/workflows/deploy-pages.yaml @@ -0,0 +1,79 @@ +# https://vitepress.dev/guide/deploy#github-pages +name: Deploy Pages +on: + workflow_call: + inputs: + sub-path: + required: false + default: "./docs" + type: string + description: location where the vitepress project is located + node-version: + required: false + default: "22" + type: string + description: node version + build-cmd: + required: false + default: "build" + type: string + description: change the build command, for use of vuepress + dist-path: + required: false + default: ".vitepress/dist" + type: string + description: output path of vite, which should be uploaded to github pages + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: pages + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ inputs.sub-path }} + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 # Required for vitepress lastUpdated + - name: Setup Node + uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version: ${{ inputs.node-version }} + cache: npm + cache-dependency-path: "${{ inputs.sub-path }}/package-lock.json" + - name: Setup Pages + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 + - name: Install dependencies + run: npm ci + - name: Build with VitePress + run: npm run ${{ inputs.build-cmd }} + - name: Upload artifact + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + with: + path: ${{ inputs.sub-path }}/${{ inputs.dist-path }} + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build + runs-on: ubuntu-latest + name: Deploy + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 \ No newline at end of file From 6a442c2ee3ea0ff1faf769a50814a89c41317b21 Mon Sep 17 00:00:00 2001 From: Hans <11695964+hupling@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:03:51 +0100 Subject: [PATCH 05/24] Update .github/actions/action-npm-build/action.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/actions/action-npm-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/action-npm-build/action.yml b/.github/actions/action-npm-build/action.yml index 3dca7cd..211333f 100644 --- a/.github/actions/action-npm-build/action.yml +++ b/.github/actions/action-npm-build/action.yml @@ -17,8 +17,8 @@ inputs: required: false default: 'true' description: Controls the execution of the 'npm run test' script -outputs: - artifact-name: +outputs: + artifact-name: description: "name of the artifact upload" value: ${{steps.artifact-name.outputs.artifact-name}} runs: From 328a10ff7b61b809c0284ce19edd6e87f967e1a6 Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:05:15 +0100 Subject: [PATCH 06/24] added closing parenthesis as proposed --- .github/actions/action-create-github-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/action-create-github-release/action.yml b/.github/actions/action-create-github-release/action.yml index 346c9b7..446c953 100644 --- a/.github/actions/action-create-github-release/action.yml +++ b/.github/actions/action-create-github-release/action.yml @@ -8,7 +8,7 @@ inputs: tag-name: required: true type: string - description: "Name of a tag (e.g. sps-1.0.0 or myproject-1.0.0" + description: "Name of a tag (e.g. sps-1.0.0 or myproject-1.0.0)" artifact-path: required: true type: string From 1477f8c391962acdfa2bbaddfc84145f4433064e Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Thu, 6 Feb 2025 16:11:48 +0100 Subject: [PATCH 07/24] Renaming GDP_PRIVATE_KEY to GPG_PRIVATE_KEY --- .github/actions/action-maven-release/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/action-maven-release/action.yml b/.github/actions/action-maven-release/action.yml index c7e162a..8e48ef2 100644 --- a/.github/actions/action-maven-release/action.yml +++ b/.github/actions/action-maven-release/action.yml @@ -34,7 +34,7 @@ inputs: required: true type: string description: env variable for token in deploy - GDP_PRIVATE_KEY: + GPG_PRIVATE_KEY: required: true type: string description: Value of the GPG private key to import @@ -63,7 +63,7 @@ runs: server-id: "central" server-username: ${{ inputs.CENTRAL_USERNAME }} server-password: ${{ inputs.CENTRAL_PASSWORD }} - gpg-private-key: ${{ inputs.GDP_PRIVATE_KEY }} + gpg-private-key: ${{ inputs.GPG_PRIVATE_KEY }} gpg-passphrase: ${{ inputs.SIGN_KEY_PASS }} - name: Maven Release Step id: maven-release-step @@ -76,7 +76,7 @@ runs: echo "MVN_ARTIFACT_ID=$MVN_ARTIFACT_ID" >> $GITHUB_OUTPUT mvn release:prepare release:perform -f .${{inputs.app-path}}/pom.xml -B -DreleaseVersion=${{ inputs.releaseVersion }} -DdevelopmentVersion=${{ inputs.developmentVersion }} -Darguments="-Dmaven.deploy.skip=${{ inputs.skipDeployment }}" env: - SIGN_KEY_PASS: ${{ inputs.GDP_PRIVATE_KEY }} + SIGN_KEY_PASS: ${{ inputs.GPG_PRIVATE_KEY }} CENTRAL_USERNAME: ${{ inputs.CENTRAL_USERNAME }} CENTRAL_PASSWORD: ${{ inputs.CENTRAL_PASSWORD }} From 5eaa09d96af18d38be17eef1391c88bf189681f8 Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Fri, 7 Feb 2025 08:18:49 +0100 Subject: [PATCH 08/24] YAML lint comment --- .github/workflows/deploy-pages.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-pages.yaml b/.github/workflows/deploy-pages.yaml index 5385364..c57cef3 100644 --- a/.github/workflows/deploy-pages.yaml +++ b/.github/workflows/deploy-pages.yaml @@ -76,4 +76,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 \ No newline at end of file + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 From ae0862ce981b49c9e79fac244aa62ed4755b6e75 Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Fri, 7 Feb 2025 08:19:29 +0100 Subject: [PATCH 09/24] Lint findings --- .github/actions/action-npm-release/action.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index b2a8c5a..56808fe 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -31,10 +31,9 @@ outputs: ARTIFACT_NAME: description: "artifact name from job artifact" value: ${{ steps.node.outputs.artifact-name }} - ARTIFACT_VERSION: - description: "version of the artifact upload" - value: ${{steps.node-release.outputs.VERSION}} - + ARTIFACT_VERSION: + description: "version of the artifact upload" + value: ${{steps.node-release.outputs.VERSION}} runs: using: "composite" steps: From 66a5146fad3fabffb4d811427a38eebfa8ffa99a Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Fri, 7 Feb 2025 08:20:13 +0100 Subject: [PATCH 10/24] Lint findings --- .github/actions/action-npm-release/action.yml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index 56808fe..ce14a7e 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -11,21 +11,21 @@ inputs: type: string description: path where the package.json is located releaseVersion: - type: choice - description: "Select version increment type (follows Semantic Versioning)" - required: true - options: - - patch - - minor - - major + type: choice + description: "Select version increment type (follows Semantic Versioning)" + required: true + options: + - patch + - minor + - major skip-deployment: - default: true - type: boolean - description: skip deployment to npm registry - npm-token: - type: string - required: true - description: npm token for release + default: true + type: boolean + description: skip deployment to npm registry + npm-token: + type: string + required: true + description: npm token for release outputs: ARTIFACT_NAME: From de9b3238de2c6ff4f87be9cf3f90660e984d12fe Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Fri, 7 Feb 2025 08:21:33 +0100 Subject: [PATCH 11/24] Yaml lint finding --- .github/actions/action-maven-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/action-maven-release/action.yml b/.github/actions/action-maven-release/action.yml index 8e48ef2..751d0b6 100644 --- a/.github/actions/action-maven-release/action.yml +++ b/.github/actions/action-maven-release/action.yml @@ -88,4 +88,4 @@ runs: with: name: ${{steps.artifact-name.outputs.artifact-name}} path: "**/target" - retention-days: 5 \ No newline at end of file + retention-days: 5 From 26bd8ea7614ee3fbb66dc6534b050476c110b154 Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Fri, 7 Feb 2025 08:22:50 +0100 Subject: [PATCH 12/24] Lint finding --- .github/actions/action-codeql/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/action-codeql/action.yml b/.github/actions/action-codeql/action.yml index 22d04d5..a081866 100644 --- a/.github/actions/action-codeql/action.yml +++ b/.github/actions/action-codeql/action.yml @@ -51,4 +51,4 @@ runs: - name: Perform CodeQL analysis for ${{ inputs.codeql-language }} uses: github/codeql-action/analyze@v3 with: - category: "/language:${{ inputs.codeql-language }}-/path:${{ inputs.path }}" \ No newline at end of file + category: "/language:${{ inputs.codeql-language }}-/path:${{ inputs.path }}" From 39199c1ca4631f14c1a1d24167d30bde7627b341 Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Fri, 7 Feb 2025 09:18:19 +0100 Subject: [PATCH 13/24] Lint Findings --- .github/actions/action-deploy-docs/action.yml | 4 +- .github/actions/action-maven-build/action.yml | 5 +- .github/actions/action-npm-build/action.yml | 8 +- .github/actions/action-npm-release/action.yml | 74 +++++++++---------- 4 files changed, 44 insertions(+), 47 deletions(-) diff --git a/.github/actions/action-deploy-docs/action.yml b/.github/actions/action-deploy-docs/action.yml index 727a3a6..f0a364b 100644 --- a/.github/actions/action-deploy-docs/action.yml +++ b/.github/actions/action-deploy-docs/action.yml @@ -8,10 +8,8 @@ inputs: deploy-branch: required: false type: string - default: 'main' + default: "main" description: "Branch to deploy documentation from" - -# Deployment job runs: using: "composite" steps: diff --git a/.github/actions/action-maven-build/action.yml b/.github/actions/action-maven-build/action.yml index 49e7ae9..3e0c7a7 100644 --- a/.github/actions/action-maven-build/action.yml +++ b/.github/actions/action-maven-build/action.yml @@ -3,7 +3,7 @@ name: Compliance check and build test inputs: java-version: required: false - default: 21 + default: "21" type: string description: set the java version app-path: @@ -15,7 +15,6 @@ outputs: description: "name of the artifact upload" value: ${{steps.artifact-name.outputs.artifact-name}} runs: - using: "composite" steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -38,4 +37,4 @@ runs: with: name: ${{steps.artifact-name.outputs.artifact-name}} path: "**/target" - retention-days: 5 \ No newline at end of file + retention-days: 5 diff --git a/.github/actions/action-npm-build/action.yml b/.github/actions/action-npm-build/action.yml index 211333f..83958e2 100644 --- a/.github/actions/action-npm-build/action.yml +++ b/.github/actions/action-npm-build/action.yml @@ -11,15 +11,15 @@ inputs: description: path where the package.json is located run-lint: required: false - default: 'true' + default: "true" description: Controls the execution of the 'npm run lint' script run-test: required: false - default: 'true' + default: "true" description: Controls the execution of the 'npm run test' script outputs: artifact-name: - description: "name of the artifact upload" + description: name of the artifact upload value: ${{steps.artifact-name.outputs.artifact-name}} runs: using: "composite" @@ -48,7 +48,7 @@ runs: - id: artifact-name run: echo "artifact-name=${{hashFiles(format('./{0}/package.json', inputs.app-path))}}" >> "$GITHUB_OUTPUT" shell: bash - - name: "Upload Artifact" + - name: Upload Artifact uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: ${{steps.artifact-name.outputs.artifact-name}} diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index ce14a7e..a6894c8 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -12,7 +12,7 @@ inputs: description: path where the package.json is located releaseVersion: type: choice - description: "Select version increment type (follows Semantic Versioning)" + description: Select version increment type (follows Semantic Versioning) required: true options: - patch @@ -29,43 +29,43 @@ inputs: outputs: ARTIFACT_NAME: - description: "artifact name from job artifact" + description: artifact name from job artifact value: ${{ steps.node.outputs.artifact-name }} ARTIFACT_VERSION: - description: "version of the artifact upload" + description: version of the artifact upload value: ${{steps.node-release.outputs.VERSION}} runs: - using: "composite" - steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Set up Node.js - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 - with: - node-version: "${{ inputs.node-version }}" - registry-url: 'https://registry.npmjs.org' - cache: "npm" - cache-dependency-path: "./${{inputs.app-path}}/package-lock.json" - - id: node-release - name: Bump version and create git tag - working-directory: ./${{inputs.app-path}} - run: | - NEW_VERSION=$(npm version ${{inputs.releaseVersion}}) || exit 1 - echo "VERSION=$NEW_VERSION" >> "$GITHUB_OUTPUT" - git config --global user.email "github-actions@github.com" - git config --global user.name "GitHub Actions" - git add package.json package-lock.json - git commit -m "Bump version to ${NEW_VERSION}" || exit 1 - git tag "${NEW_VERSION}" || exit 1 - git push && git push --tags || exit 1 - shell: bash - - id: node - uses: it-at-m/.github/.github/actions/action-npm-build@main - with: - app-path: "${{ inputs.app-path }}" - - if: "${{ !inputs.skip-deployment }}" - shell: bash - working-directory: ./${{inputs.app-path}} - run: npm --prefix ./${{ inputs.app-path }} publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ inputs.npm-token }} # Centralized token in it-at-m GitHub organization + using: "composite" + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up Node.js + uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version: "${{ inputs.node-version }}" + registry-url: 'https://registry.npmjs.org' + cache: "npm" + cache-dependency-path: "./${{inputs.app-path}}/package-lock.json" + - id: node-release + name: Bump version and create git tag + working-directory: ./${{inputs.app-path}} + run: | + NEW_VERSION=$(npm version ${{inputs.releaseVersion}}) || exit 1 + echo "VERSION=$NEW_VERSION" >> "$GITHUB_OUTPUT" + git config --global user.email "github-actions@github.com" + git config --global user.name "GitHub Actions" + git add package.json package-lock.json + git commit -m "Bump version to ${NEW_VERSION}" || exit 1 + git tag "${NEW_VERSION}" || exit 1 + git push && git push --tags || exit 1 + shell: bash + - id: node + uses: it-at-m/.github/.github/actions/action-npm-build@main + with: + app-path: "${{ inputs.app-path }}" + - if: "${{ !inputs.skip-deployment }}" + shell: bash + working-directory: ./${{inputs.app-path}} + run: npm --prefix ./${{ inputs.app-path }} publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ inputs.npm-token }} # Centralized token in it-at-m GitHub organization From 287523b41bfaeb6f95bbe7ac86ec2a8ee7fffe4e Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Fri, 7 Feb 2025 09:24:25 +0100 Subject: [PATCH 14/24] Linting --- .github/actions/action-npm-release/action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index a6894c8..a40efc0 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -50,14 +50,14 @@ runs: name: Bump version and create git tag working-directory: ./${{inputs.app-path}} run: | - NEW_VERSION=$(npm version ${{inputs.releaseVersion}}) || exit 1 - echo "VERSION=$NEW_VERSION" >> "$GITHUB_OUTPUT" - git config --global user.email "github-actions@github.com" - git config --global user.name "GitHub Actions" - git add package.json package-lock.json - git commit -m "Bump version to ${NEW_VERSION}" || exit 1 - git tag "${NEW_VERSION}" || exit 1 - git push && git push --tags || exit 1 + NEW_VERSION=$(npm version ${{inputs.releaseVersion}}) || exit 1 + echo "VERSION=$NEW_VERSION" >> "$GITHUB_OUTPUT" + git config --global user.email "github-actions@github.com" + git config --global user.name "GitHub Actions" + git add package.json package-lock.json + git commit -m "Bump version to ${NEW_VERSION}" || exit 1 + git tag "${NEW_VERSION}" || exit 1 + git push && git push --tags || exit 1 shell: bash - id: node uses: it-at-m/.github/.github/actions/action-npm-build@main From bc9d7b0317f36b4e08a3bcdc7fa1f216310945d8 Mon Sep 17 00:00:00 2001 From: Hans <11695964+hupling@users.noreply.github.com> Date: Fri, 7 Feb 2025 09:54:46 +0100 Subject: [PATCH 15/24] Update .github/actions/action-maven-release/action.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/actions/action-maven-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/action-maven-release/action.yml b/.github/actions/action-maven-release/action.yml index 751d0b6..37f5dde 100644 --- a/.github/actions/action-maven-release/action.yml +++ b/.github/actions/action-maven-release/action.yml @@ -59,7 +59,7 @@ runs: java-version: ${{ inputs.java-version }} distribution: "temurin" cache: "maven" - cache-dependency-path: ".${{ inputs.app-path}}/pom.xml" + cache-dependency-path: "./${{ inputs.app-path}}/pom.xml" server-id: "central" server-username: ${{ inputs.CENTRAL_USERNAME }} server-password: ${{ inputs.CENTRAL_PASSWORD }} From 5a407b66797846e4bd06b3805f4bc83fed494018 Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:48:39 +0100 Subject: [PATCH 16/24] Linting Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/actions/action-npm-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index a40efc0..963ae3f 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -68,4 +68,4 @@ runs: working-directory: ./${{inputs.app-path}} run: npm --prefix ./${{ inputs.app-path }} publish --provenance --access public env: - NODE_AUTH_TOKEN: ${{ inputs.npm-token }} # Centralized token in it-at-m GitHub organization + NODE_AUTH_TOKEN: ${{ inputs.npm-token }} # Centralized token in it-at-m GitHub organization From 0e9b883d4ed413267f4b42b1cee7280fcba8e7a5 Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:50:11 +0100 Subject: [PATCH 17/24] Linting Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/actions/action-npm-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index 963ae3f..3788e50 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -62,7 +62,7 @@ runs: - id: node uses: it-at-m/.github/.github/actions/action-npm-build@main with: - app-path: "${{ inputs.app-path }}" + app-path: "${{ inputs.app-path }}" - if: "${{ !inputs.skip-deployment }}" shell: bash working-directory: ./${{inputs.app-path}} From a9aaecf9a77a3303f0392e64cfd1856a4a70f998 Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Fri, 7 Feb 2025 10:57:52 +0100 Subject: [PATCH 18/24] Linting --- .github/actions/action-npm-release/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index 3788e50..c55a744 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -26,11 +26,10 @@ inputs: type: string required: true description: npm token for release - outputs: ARTIFACT_NAME: description: artifact name from job artifact - value: ${{ steps.node.outputs.artifact-name }} + value: ${{ steps.node.outputs.artifact-name }} ARTIFACT_VERSION: description: version of the artifact upload value: ${{steps.node-release.outputs.VERSION}} From 23616bc721975e48edca20d750a0e8ea78b92db2 Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Fri, 7 Feb 2025 11:04:20 +0100 Subject: [PATCH 19/24] Linting --- .github/actions/action-npm-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index c55a744..382103d 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -42,7 +42,7 @@ runs: uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: node-version: "${{ inputs.node-version }}" - registry-url: 'https://registry.npmjs.org' + registry-url: "https://registry.npmjs.org" cache: "npm" cache-dependency-path: "./${{inputs.app-path}}/package-lock.json" - id: node-release From 2eb04d4e0f019e2b8bb947a65fcbbac4a311c63e Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Fri, 7 Feb 2025 11:23:32 +0100 Subject: [PATCH 20/24] Linting --- .github/actions/action-npm-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/action-npm-release/action.yml b/.github/actions/action-npm-release/action.yml index 382103d..55f0c69 100644 --- a/.github/actions/action-npm-release/action.yml +++ b/.github/actions/action-npm-release/action.yml @@ -67,4 +67,4 @@ runs: working-directory: ./${{inputs.app-path}} run: npm --prefix ./${{ inputs.app-path }} publish --provenance --access public env: - NODE_AUTH_TOKEN: ${{ inputs.npm-token }} # Centralized token in it-at-m GitHub organization + NODE_AUTH_TOKEN: ${{ inputs.npm-token }} # Centralized token in it-at-m GitHub organization From 5f44eee021e1470e3f3dd57ab73d5fc546bde2c4 Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Fri, 7 Feb 2025 12:26:34 +0100 Subject: [PATCH 21/24] moved .github/actions to action-templates/actions --- .../actions/action-build-docs/action.yml | 0 .../actions/action-build-image/action.yml | 0 {.github => action-templates}/actions/action-checkout/action.yml | 0 {.github => action-templates}/actions/action-codeql/action.yml | 0 .../actions/action-create-github-release/action.yml | 0 .../actions/action-deploy-docs/action.yml | 0 .../actions/action-maven-build/action.yml | 0 .../actions/action-maven-release/action.yml | 0 {.github => action-templates}/actions/action-npm-build/action.yml | 0 .../actions/action-npm-release/action.yml | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename {.github => action-templates}/actions/action-build-docs/action.yml (100%) rename {.github => action-templates}/actions/action-build-image/action.yml (100%) rename {.github => action-templates}/actions/action-checkout/action.yml (100%) rename {.github => action-templates}/actions/action-codeql/action.yml (100%) rename {.github => action-templates}/actions/action-create-github-release/action.yml (100%) rename {.github => action-templates}/actions/action-deploy-docs/action.yml (100%) rename {.github => action-templates}/actions/action-maven-build/action.yml (100%) rename {.github => action-templates}/actions/action-maven-release/action.yml (100%) rename {.github => action-templates}/actions/action-npm-build/action.yml (100%) rename {.github => action-templates}/actions/action-npm-release/action.yml (100%) diff --git a/.github/actions/action-build-docs/action.yml b/action-templates/actions/action-build-docs/action.yml similarity index 100% rename from .github/actions/action-build-docs/action.yml rename to action-templates/actions/action-build-docs/action.yml diff --git a/.github/actions/action-build-image/action.yml b/action-templates/actions/action-build-image/action.yml similarity index 100% rename from .github/actions/action-build-image/action.yml rename to action-templates/actions/action-build-image/action.yml diff --git a/.github/actions/action-checkout/action.yml b/action-templates/actions/action-checkout/action.yml similarity index 100% rename from .github/actions/action-checkout/action.yml rename to action-templates/actions/action-checkout/action.yml diff --git a/.github/actions/action-codeql/action.yml b/action-templates/actions/action-codeql/action.yml similarity index 100% rename from .github/actions/action-codeql/action.yml rename to action-templates/actions/action-codeql/action.yml diff --git a/.github/actions/action-create-github-release/action.yml b/action-templates/actions/action-create-github-release/action.yml similarity index 100% rename from .github/actions/action-create-github-release/action.yml rename to action-templates/actions/action-create-github-release/action.yml diff --git a/.github/actions/action-deploy-docs/action.yml b/action-templates/actions/action-deploy-docs/action.yml similarity index 100% rename from .github/actions/action-deploy-docs/action.yml rename to action-templates/actions/action-deploy-docs/action.yml diff --git a/.github/actions/action-maven-build/action.yml b/action-templates/actions/action-maven-build/action.yml similarity index 100% rename from .github/actions/action-maven-build/action.yml rename to action-templates/actions/action-maven-build/action.yml diff --git a/.github/actions/action-maven-release/action.yml b/action-templates/actions/action-maven-release/action.yml similarity index 100% rename from .github/actions/action-maven-release/action.yml rename to action-templates/actions/action-maven-release/action.yml diff --git a/.github/actions/action-npm-build/action.yml b/action-templates/actions/action-npm-build/action.yml similarity index 100% rename from .github/actions/action-npm-build/action.yml rename to action-templates/actions/action-npm-build/action.yml diff --git a/.github/actions/action-npm-release/action.yml b/action-templates/actions/action-npm-release/action.yml similarity index 100% rename from .github/actions/action-npm-release/action.yml rename to action-templates/actions/action-npm-release/action.yml From f0574308d76b50fe501a97648345263e03ec2307 Mon Sep 17 00:00:00 2001 From: "silke.schmid" Date: Fri, 7 Feb 2025 12:28:30 +0100 Subject: [PATCH 22/24] Workflow deploy-pages implementation only in repo refarch-templates --- .github/workflows/deploy-pages.yaml | 79 ----------------------------- 1 file changed, 79 deletions(-) delete mode 100644 .github/workflows/deploy-pages.yaml diff --git a/.github/workflows/deploy-pages.yaml b/.github/workflows/deploy-pages.yaml deleted file mode 100644 index c57cef3..0000000 --- a/.github/workflows/deploy-pages.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# https://vitepress.dev/guide/deploy#github-pages -name: Deploy Pages -on: - workflow_call: - inputs: - sub-path: - required: false - default: "./docs" - type: string - description: location where the vitepress project is located - node-version: - required: false - default: "22" - type: string - description: node version - build-cmd: - required: false - default: "build" - type: string - description: change the build command, for use of vuepress - dist-path: - required: false - default: ".vitepress/dist" - type: string - description: output path of vite, which should be uploaded to github pages - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: pages - cancel-in-progress: false - -jobs: - # Build job - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ${{ inputs.sub-path }} - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 # Required for vitepress lastUpdated - - name: Setup Node - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 - with: - node-version: ${{ inputs.node-version }} - cache: npm - cache-dependency-path: "${{ inputs.sub-path }}/package-lock.json" - - name: Setup Pages - uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 - - name: Install dependencies - run: npm ci - - name: Build with VitePress - run: npm run ${{ inputs.build-cmd }} - - name: Upload artifact - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 - with: - path: ${{ inputs.sub-path }}/${{ inputs.dist-path }} - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - needs: build - runs-on: ubuntu-latest - name: Deploy - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 From 5adb104bae0343c55fecfd054d508a67656fdd7f Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Mon, 10 Feb 2025 08:28:55 +0100 Subject: [PATCH 23/24] missing / added --- action-templates/actions/action-maven-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action-templates/actions/action-maven-release/action.yml b/action-templates/actions/action-maven-release/action.yml index 37f5dde..31e40f7 100644 --- a/action-templates/actions/action-maven-release/action.yml +++ b/action-templates/actions/action-maven-release/action.yml @@ -74,7 +74,7 @@ runs: MVN_ARTIFACT_ID=$(mvn -f .${{inputs.app-path}}/pom.xml org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.artifactId -q -DforceStdout) echo $MVN_ARTIFACT_ID echo "MVN_ARTIFACT_ID=$MVN_ARTIFACT_ID" >> $GITHUB_OUTPUT - mvn release:prepare release:perform -f .${{inputs.app-path}}/pom.xml -B -DreleaseVersion=${{ inputs.releaseVersion }} -DdevelopmentVersion=${{ inputs.developmentVersion }} -Darguments="-Dmaven.deploy.skip=${{ inputs.skipDeployment }}" + mvn release:prepare release:perform -f ./${{inputs.app-path}}/pom.xml -B -DreleaseVersion=${{ inputs.releaseVersion }} -DdevelopmentVersion=${{ inputs.developmentVersion }} -Darguments="-Dmaven.deploy.skip=${{ inputs.skipDeployment }}" env: SIGN_KEY_PASS: ${{ inputs.GPG_PRIVATE_KEY }} CENTRAL_USERNAME: ${{ inputs.CENTRAL_USERNAME }} From d51bbcfff8d54c79757fb872b8bb1bbd9d1cbd2c Mon Sep 17 00:00:00 2001 From: Silke <33521006+ejcsid@users.noreply.github.com> Date: Mon, 10 Feb 2025 08:29:19 +0100 Subject: [PATCH 24/24] SIGN_KEY_PASS: ${{ inputs.SIGN_KEY_PASS}} --- action-templates/actions/action-maven-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action-templates/actions/action-maven-release/action.yml b/action-templates/actions/action-maven-release/action.yml index 31e40f7..42dbb14 100644 --- a/action-templates/actions/action-maven-release/action.yml +++ b/action-templates/actions/action-maven-release/action.yml @@ -76,7 +76,7 @@ runs: echo "MVN_ARTIFACT_ID=$MVN_ARTIFACT_ID" >> $GITHUB_OUTPUT mvn release:prepare release:perform -f ./${{inputs.app-path}}/pom.xml -B -DreleaseVersion=${{ inputs.releaseVersion }} -DdevelopmentVersion=${{ inputs.developmentVersion }} -Darguments="-Dmaven.deploy.skip=${{ inputs.skipDeployment }}" env: - SIGN_KEY_PASS: ${{ inputs.GPG_PRIVATE_KEY }} + SIGN_KEY_PASS: ${{ inputs.SIGN_KEY_PASS}} CENTRAL_USERNAME: ${{ inputs.CENTRAL_USERNAME }} CENTRAL_PASSWORD: ${{ inputs.CENTRAL_PASSWORD }}