From 7c2e58c1c110f63313a84105500099c42f189c91 Mon Sep 17 00:00:00 2001 From: KevinR Date: Wed, 20 Mar 2024 11:07:36 +0100 Subject: [PATCH] Added documentation, added versioning --- .../workflows/{setup.yml => setup-matrix.yml} | 12 +-- .github/workflows/versioning.yml | 13 +++ README.md | 96 ++++++++++++++++++- action.yml | 25 +++-- 4 files changed, 129 insertions(+), 17 deletions(-) rename .github/workflows/{setup.yml => setup-matrix.yml} (80%) create mode 100644 .github/workflows/versioning.yml diff --git a/.github/workflows/setup.yml b/.github/workflows/setup-matrix.yml similarity index 80% rename from .github/workflows/setup.yml rename to .github/workflows/setup-matrix.yml index 349138c..4b0e646 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup-matrix.yml @@ -1,9 +1,6 @@ -name: Setup CODESYS Installation +name: Setup CODESYS Installation in matrix -on: - push: - branches: - - master +on: push jobs: setup-codesys: @@ -41,7 +38,4 @@ jobs: installer-version: 2.2.2 generation: ${{ matrix.generation }} architecture: ${{ matrix.architecture }} - patch: ${{ matrix.patch }} - hotfix: 0 - build: 0 - #installation-directory: C:\CODESYS \ No newline at end of file + patch: ${{ matrix.patch }} \ No newline at end of file diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml new file mode 100644 index 0000000..07e7d82 --- /dev/null +++ b/.github/workflows/versioning.yml @@ -0,0 +1,13 @@ +name: Keep the versions up-to-date + +on: + release: + types: [published, edited] + +jobs: + actions-tagger: + runs-on: ubuntu-latest + steps: + - uses: Actions-R-Us/actions-tagger@latest + with: + publish_latest_tag: false \ No newline at end of file diff --git a/README.md b/README.md index ddc93d3..273e000 100644 --- a/README.md +++ b/README.md @@ -1 +1,95 @@ -# action-codesys-setup \ No newline at end of file +# Github action setup CODESYS + +> This github action is used to install CODESYS for CI/CD jobs. + +## About + +This action is designed to install CODESYS for further CI/CD jobs, such as signing libraries, signing packages, etc. +It can also be used to process test cases or other CI/CD jobs in your workflow. + +## Usage + +>:white_flag: See the [inputs](#inputs) section for detailed descriptions. + +```yml +- name: Setup CODESYS + uses: powerIO-GmbH/action-codesys-setup@v + with: + installer-version: 2.2.2 + generation: 3.5.19.0 + architecture: 64 + patch: 6 + hotfix: 0 + build: 0 +``` + +## Usage examples + +- Install CODESYS Version `3.5.17.2`: +```yml +- name: Setup CODESYS + uses: powerIO-GmbH/action-codesys-setup@v + with: + generation: 3.5.17.0 + architecture: 64 + patch: 2 +``` + +## Inputs + +The action supports the following inputs: + +- `installer-version` + + The version of the installer to use to install the CODESYS installation. + + **required:** *false* + **default:**: *`2.2.2`* + +- `generation` + + This is the base generation you want to install. For example `3.5.19.0`. + Even if you want to install the version `3.5.19.6` you have to define the generation as `3.5.19.0`. + The patch version is defined by the `patch` input. + + **required:** *false* + **default:**: *`3.5.19.0`* + +- `architecture` + + The installation architecture of CODESYS. Allowed inputs: `32` and `64`. + + **required:** *false* + **default:**: *`64`* + +- `patch` + + The patch of the CODESYS version to install. + + **required:** *false* + **default:**: *`0`* + +- `hotfix` + + The hotfix of the CODESYS version to install. + + **required:** *false* + **default:**: *`0`* + +- `build` + + The build of the CODESYS version to install. + + **required:** *false* + **default:**: *`0`* + +- `installation-directory` + + This can be used to define a custom installation directory. + If this input is empty, the installation path is set based on the architecture and installation version. + + For example - bit `64`, generation `3.5.19.0` and patch `6`: + `C:\Program Files\CODESYS 3.5.19.6` + + For example - bit `32`, generation `3.5.17.0` and patch `2`: + `C:\Program Files (x86)\CODESYS 3.5.17.2` \ No newline at end of file diff --git a/action.yml b/action.yml index a8387d3..33efffe 100644 --- a/action.yml +++ b/action.yml @@ -8,37 +8,48 @@ branding: inputs: installer-version: - description: 'The version of the CODESYS installer to use' + description: 'The version of the installer to use to install the CODESYS installation.' required: false default: 2.2.2 generation: - description: 'The generation of the CODESYS version to install' + description: > + 'This is the base generation you want to install. For example `3.5.19.0`. + Even if you want to install the version `3.5.19.6` you have to define the generation as `3.5.19.0`. + The patch version is defined by the `patch` input.' required: false default: 3.5.19.0 architecture: - description: 'The architecture of the CODESYS version to install' + description: 'The installation architecture of CODESYS. Allowed inputs: `32` and `64`.' required: false default: 64 patch: - description: 'The patch of the CODESYS version to install' + description: 'The patch of the CODESYS version to install.' required: false default: 0 hotfix: - description: 'The hotfix of the CODESYS version to install' + description: 'The hotfix of the CODESYS version to install.' required: false default: 0 build: - description: 'The build of the CODESYS version to install' + description: 'The build of the CODESYS version to install.' required: false default: 0 installation-directory: - description: 'The directory to install CODESYS to' + description: > + 'This can be used to define a custom installation directory. + If this input is empty, the installation path is set based on the architecture and installation version. + + For example - bit `64`, generation `3.5.19.0` and patch `6`: + `C:\Program Files\CODESYS 3.5.19.6` + + For example - bit `32`, generation `3.5.17.0` and patch `2`: + `C:\Program Files (x86)\CODESYS 3.5.17.2`' required: false default: ''