From 776d097a406ad6552c1049f89344a36d93c091c8 Mon Sep 17 00:00:00 2001 From: "Drosdzoll, Thomas (DI FA CTR EE PO2)" Date: Mon, 28 Apr 2025 16:55:38 +0200 Subject: [PATCH 1/3] Incorporate new actions and workflows --- .github/workflows/lint-repo.yml | 4 -- .../package-development-workflow.yml | 48 ++++++++++++++ .../workflows/package-release-workflow.yml | 63 +++++++++++++++++++ .github/workflows/release-library.yml | 17 ----- .markdownlint.yml | 14 ----- CODEOWNERS | 2 +- repolinter.json | 21 ------- 7 files changed, 112 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/lint-repo.yml create mode 100644 .github/workflows/package-development-workflow.yml create mode 100644 .github/workflows/package-release-workflow.yml delete mode 100644 .github/workflows/release-library.yml delete mode 100644 .markdownlint.yml delete mode 100644 repolinter.json diff --git a/.github/workflows/lint-repo.yml b/.github/workflows/lint-repo.yml deleted file mode 100644 index 9863aa7..0000000 --- a/.github/workflows/lint-repo.yml +++ /dev/null @@ -1,4 +0,0 @@ -on: push -jobs: - lint-repo-and-markdown: - uses: simatic-ax/actions/.github/workflows/check-repository.yml@stable diff --git a/.github/workflows/package-development-workflow.yml b/.github/workflows/package-development-workflow.yml new file mode 100644 index 0000000..f766c42 --- /dev/null +++ b/.github/workflows/package-development-workflow.yml @@ -0,0 +1,48 @@ +# This workflow is going to be used during the development phase of the project +# The workflow builds and tests the the sources on the following triggers: +# - once a change is pushed to the main branch or any of its sub-branches +name: Library development workflow + +on: + push: + branches: + - 'main' # runs the workflow, once new changes have been integrated to main + - 'main/**' # runs the workflow, once new changes have been integrated to a sub-branch of main + pull_request: + branches: + - 'main' # run workflow in the scope of pull requests towards main + workflow_call: + secrets: + APAX_TOKEN: + required: true + inputs: + ref: + required: true + type: string + +permissions: + contents: read # required for checkout + packages: read # required for pulling the container + actions: write # required for artifact uploading + +jobs: + build-and-test: + name: Build and Test + runs-on: ubuntu-24.04 + container: + image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.4.2 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + # either check out a provided reference, or use the reference that triggered this workflow, e.g. a push, PR or a release + ref: ${{ inputs.ref != '' && inputs.ref || github.ref }} + + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + check-modified-files-only: 'yes' + base-branch: 'main' \ No newline at end of file diff --git a/.github/workflows/package-release-workflow.yml b/.github/workflows/package-release-workflow.yml new file mode 100644 index 0000000..b1e141c --- /dev/null +++ b/.github/workflows/package-release-workflow.yml @@ -0,0 +1,63 @@ +# This workflow is triggered when a release is published via the UI +# The workflow is only executed if the release is a tag and the target_commitish is a release branch +name: Release workflow + +# Start the workflow as soon as a release has been published via the UI +on: + release: + types: [published] + +permissions: + contents: write # required for checkout + packages: write # required for pulling the container + actions: write # required for artifact downloading + pull-requests: write # Für PR-Erstellung und Management + +jobs: + call-development: + name: Build the package + uses: ./.github/workflows/package-development-workflow.yml + secrets: + APAX_TOKEN: ${{ secrets.APAX_TOKEN }} + with: + # checks out the branch that has been selected during the release process + ref: ${{ github.event.release.target_commitish }} + + release: + name: Release the package + needs: call-development + runs-on: ubuntu-24.04 + container: + image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.4.2 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.target_commitish }} + fetch-depth: 0 + + - name: Version package + uses: simatic-ax/actions/apax-version@v3 + with: + version: ${{ github.event.release.tag_name }} + + - name: Package source code + uses: simatic-ax/actions/apax-pack@v3 + with: + key: ${{ secrets.APAX_SIGNKEY }} + + - name: Login to required registries + uses: simatic-ax/actions/apax-login@v3 + with: + apax-token: ${{ secrets.APAX_TOKEN }} + registries: | + https://npm.pkg.github.com/,${{ secrets.GITHUB_TOKEN }} + + - name: Publish apax package + uses: simatic-ax/actions/apax-publish@v3 + with: + registries: | + https://npm.pkg.github.com \ No newline at end of file diff --git a/.github/workflows/release-library.yml b/.github/workflows/release-library.yml deleted file mode 100644 index 0338480..0000000 --- a/.github/workflows/release-library.yml +++ /dev/null @@ -1,17 +0,0 @@ -on: - push: - # Pattern matched against refs/tags - tags: - - '*' - -jobs: - release-apax-lib: - uses: simatic-ax/actions/.github/workflows/apax-publish.yml@stable - secrets: - APAX_TOKEN: ${{ secrets.APAX_TOKEN }} - DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} - APAX_SIGNKEY: ${{ secrets.APAX_SIGNKEY }} - - with: - VERSION: ${{ github.ref_name }} - RUN_BUILD: false \ No newline at end of file diff --git a/.markdownlint.yml b/.markdownlint.yml deleted file mode 100644 index 62620c9..0000000 --- a/.markdownlint.yml +++ /dev/null @@ -1,14 +0,0 @@ -# markdownlint YAML configuration ---- - -# Default state for all rules -default: true - -# ignored rules -line-length: false -no-inline-html: false -first-line-h1: false -no-emphasis-as-header: false -MD024: - allow_different_nesting: true - siblings_only: true \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index 85e15db..db041c3 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,4 +1,4 @@ # These owners will be the default owners for everything in the repo. # Unless a later match takes precedence, the listed user will be # requested for review when someone opens a pull request. -* @BeckerStS @sjuergen \ No newline at end of file +* @sjuergen @ReinerSchinkoethe @theBadT @BeckerStS \ No newline at end of file diff --git a/repolinter.json b/repolinter.json deleted file mode 100644 index f662361..0000000 --- a/repolinter.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json", - "version": 2, - "axioms": { - "linguist": "language", - "licensee": "license", - "packagers": "packager" - }, - "rules": { - "license-file-exists": { - "level": "off", - "rule": { - "type": "file-existence", - "options": { - "globsAny": ["LICENSE*", "COPYING*"], - "nocase": true - } - } - } - } -} \ No newline at end of file From c55ee2205b6ccbdeb72b15c0edc0eb6b4c5a838d Mon Sep 17 00:00:00 2001 From: "Drosdzoll, Thomas (DI FA CTR EE PO2)" Date: Tue, 26 Aug 2025 09:52:24 +0200 Subject: [PATCH 2/3] optimize development workflow --- .github/workflows/package-development-workflow.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/package-development-workflow.yml b/.github/workflows/package-development-workflow.yml index f766c42..61c5efb 100644 --- a/.github/workflows/package-development-workflow.yml +++ b/.github/workflows/package-development-workflow.yml @@ -7,10 +7,8 @@ on: push: branches: - 'main' # runs the workflow, once new changes have been integrated to main - - 'main/**' # runs the workflow, once new changes have been integrated to a sub-branch of main pull_request: - branches: - - 'main' # run workflow in the scope of pull requests towards main + workflow_call: secrets: APAX_TOKEN: From 817d6f27bad942f0c6defa751a6ff4cd69cdee13 Mon Sep 17 00:00:00 2001 From: "Drosdzoll, Thomas (DI FA CTR EE PO2)" Date: Tue, 26 Aug 2025 10:10:28 +0200 Subject: [PATCH 3/3] update image version --- .github/workflows/package-development-workflow.yml | 4 ++-- .github/workflows/package-release-workflow.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package-development-workflow.yml b/.github/workflows/package-development-workflow.yml index 61c5efb..9a70ea6 100644 --- a/.github/workflows/package-development-workflow.yml +++ b/.github/workflows/package-development-workflow.yml @@ -8,7 +8,7 @@ on: branches: - 'main' # runs the workflow, once new changes have been integrated to main pull_request: - + workflow_call: secrets: APAX_TOKEN: @@ -28,7 +28,7 @@ jobs: name: Build and Test runs-on: ubuntu-24.04 container: - image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.4.2 + image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.5.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/package-release-workflow.yml b/.github/workflows/package-release-workflow.yml index b1e141c..88a1d4b 100644 --- a/.github/workflows/package-release-workflow.yml +++ b/.github/workflows/package-release-workflow.yml @@ -28,7 +28,7 @@ jobs: needs: call-development runs-on: ubuntu-24.04 container: - image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.4.2 + image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.5.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}