From c997527586e50fadf7ab019c095e884799de5b79 Mon Sep 17 00:00:00 2001 From: "Drosdzoll, Thomas (DI FA CTR EE PO2)" Date: Thu, 8 May 2025 22:54:16 +0200 Subject: [PATCH 1/2] chore(deps): Adds the SIMATIC AX catalog 2504 to the apax.yml --- .../application-example-release-workflow.yml | 78 +++++++++++++++++++ .../package-development-workflow.yml | 60 ++++++++++++++ .../workflows/release-applicationexample.yml | 15 ---- apax.yml | 6 +- 4 files changed, 142 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/application-example-release-workflow.yml create mode 100644 .github/workflows/package-development-workflow.yml delete mode 100644 .github/workflows/release-applicationexample.yml diff --git a/.github/workflows/application-example-release-workflow.yml b/.github/workflows/application-example-release-workflow.yml new file mode 100644 index 0000000..3c77358 --- /dev/null +++ b/.github/workflows/application-example-release-workflow.yml @@ -0,0 +1,78 @@ +# This workflow is triggered when a release is published via the UI +name: Release workflow + +# Start the workflow as soon as a release has been published via the UI +on: + release: + types: [published] + +permissions: + contents: read # required for checkout + packages: write # required for pulling the container + actions: write # required for artifact uploading + +env: + TEMPLATE_PATH: working-directory + +jobs: + call-development: + name: Build the package + uses: ./.github/workflows/package-development-workflow.yml + secrets: + APAX_TOKEN: ${{ secrets.APAX_TOKEN }} + with: + 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.5.0 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + # checks out the branch that has been selected during the release process + 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: Templatify repository + uses: simatic-ax/actions/apax-templatify@v3 + with: + version: ${{ github.event.release.tag_name }} + + - name: Version package + uses: simatic-ax/actions/apax-version@v3 + with: + version: ${{ github.event.release.tag_name }} + path: ${{ env.TEMPLATE_PATH }}/template + + - name: Pack the template + uses: simatic-ax/actions/apax-pack@v3 + with: + key: ${{ secrets.APAX_SIGNKEY }} + path: ${{ env.TEMPLATE_PATH }} + + - 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 + tag: latest + path: ${{ env.TEMPLATE_PATH }} \ No newline at end of file diff --git a/.github/workflows/package-development-workflow.yml b/.github/workflows/package-development-workflow.yml new file mode 100644 index 0000000..fb6b298 --- /dev/null +++ b/.github/workflows/package-development-workflow.yml @@ -0,0 +1,60 @@ +# This workflow is going to be used during the development phase of the project +name: Application development workflow + +on: + push: + branches: + - 'main' # runs the workflow, once new changes have been integrated to main + pull_request: + 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.5.0 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref != '' && inputs.ref || github.ref }} + + - 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: Install dependencies + uses: simatic-ax/actions/apax-install@v3 + with: + immutable: true + + - name: Build source code + uses: simatic-ax/actions/apax-build@v3 + + - name: Test source code + uses: simatic-ax/actions/apax-test@v3 + + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + check-modified-files-only: 'yes' + base-branch: 'main' diff --git a/.github/workflows/release-applicationexample.yml b/.github/workflows/release-applicationexample.yml deleted file mode 100644 index 808985f..0000000 --- a/.github/workflows/release-applicationexample.yml +++ /dev/null @@ -1,15 +0,0 @@ -on: - push: - branches: - - 'main' - -jobs: - release-apax-lib: - uses: simatic-ax/actions/.github/workflows/apax-publish-applicationexample.yml@stable - secrets: - APAX_TOKEN: ${{ secrets.APAX_TOKEN }} - DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} - - with: - VERSION: ${{ github.ref_name }} - PROJECT_NAME: ae-debugging diff --git a/apax.yml b/apax.yml index e7b25a7..58dc256 100644 --- a/apax.yml +++ b/apax.yml @@ -3,8 +3,10 @@ version: 2.0.0 type: app targets: - "1500" +catalogs: + "@ax/simatic-ax": 2504.0.0 devDependencies: - "@ax/sdk": 2411.0.0 + "@ax/sdk": 2504.0.0 variables: APAX_BUILD_ARGS: - - "--debug" + - "--debug" From fd54a006f85e638c57e807b4889671d7247a2c7b Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Tue, 13 May 2025 10:26:51 +0200 Subject: [PATCH 2/2] added templatify-meta.yml --- templatify-meta-information.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 templatify-meta-information.yml diff --git a/templatify-meta-information.yml b/templatify-meta-information.yml new file mode 100644 index 0000000..cb44d79 --- /dev/null +++ b/templatify-meta-information.yml @@ -0,0 +1,17 @@ +# this files section will be used for the github workflow +# the apax.yml will be created dynamically in the workflow - also the files section +# here you can define the content + +files: + - .vscode + - docs + - src + - test + - mon + - .gitattributes + - .gitignore + - ax-sdb-example.cer + - apax-lock.json + - apax.yml + - README.md + - LICENSE.md \ No newline at end of file