diff --git a/.github/workflows/build.lazarus.yml b/.github/workflows/build.lazarus.yml index 82c3f0a..91eeb4f 100644 --- a/.github/workflows/build.lazarus.yml +++ b/.github/workflows/build.lazarus.yml @@ -8,18 +8,6 @@ on: workflow_call: inputs: - app-name: - description: Application Name - required: true - type: string - lpi-path: - description: Path to the *.lpi file - required: true - type: string - triplets: - description: A JSON object containing the triplets - required: true - type: string config: description: A JSON object containing configuration values required: true @@ -49,8 +37,8 @@ jobs: }} _EXE_TRIPLET_: ${{ matrix.os == 'windows-latest' && - format('{0}-{1}.exe', inputs.app-name, fromJSON(inputs.config).triplets.(matrix.os)) || - format('{0}-{1}', inputs.app-name, fromJSON(inputs.config).triplets.(matrix.os)) + format('{0}-{1}.exe', fromJSON(inputs.config).app-name, fromJSON(inputs.config).triplets.ubuntu-latest) || + format('{0}-{1}', fromJSON(inputs.config).app-name, fromJSON(inputs.config).triplets.ubuntu-latest) }} strategy: @@ -90,7 +78,7 @@ jobs: run: | echo App Name: ${{ fromJSON(inputs.config).app-name }} echo LPI Path: ${{ fromJSON(inputs.config).lpi-path }}/${{ fromJSON(inputs.config).app-name }}.lpi - echo Triplets: ${{ inputs.triplets }} + echo Triplets: ${{ fromJSON(inputs.config).triplets }} echo Matrix OS: ${{ matrix.os }} echo Executable: ${{ env._EXE_ }} echo Executable with triplet: ${{ env._EXE_TRIPLET_ }} @@ -102,15 +90,15 @@ jobs: case "${{ matrix.os }}" in "windows-latest") echo Setting win-artefact-path to ${{ fromJSON(inputs.config).triplets[matrix.os] }} - echo "win-artefact-path=${{ fromJSON(inputs.config).triplets[matrix.os] }}" >> "$GIT_OUTPUT" + echo "win-artefact-path=${{ fromJSON(inputs.config).triplets.windows-latest }}" >> "$GIT_OUTPUT" ;; "ubuntu-latest") echo Setting lin-artefact-path to ${{ fromJSON(inputs.config).triplets[matrix.os] }} - echo "lin-artefact-path=${{ fromJSON(inputs.config).triplets[matrix.os] }}" >> "$GIT_OUTPUT" + echo "lin-artefact-path=${{ fromJSON(inputs.config).triplets.ubuntu-latest }}" >> "$GIT_OUTPUT" ;; "macos-latest") echo Setting osx-artefact-path to ${{ fromJSON(inputs.config).triplets[matrix.os] }} - echo "osx-artefact-path=${{ fromJSON(inputs.config).triplets[matrix.os] }}" >> "$GIT_OUTPUT" + echo "osx-artefact-path=${{ fromJSON(inputs.config).triplets.macos-latest }}" >> "$GIT_OUTPUT" ;; esac diff --git a/.github/workflows/main.lazarus.yml b/.github/workflows/main.lazarus.yml index c33f256..4ebd2b7 100644 --- a/.github/workflows/main.lazarus.yml +++ b/.github/workflows/main.lazarus.yml @@ -19,13 +19,6 @@ jobs: name: Build Application uses: gcarreno/re-usable-workflows/.github/workflows/build.lazarus.yml@main with: - app-name: helloworld - lpi-path: src - triplets: '{ - "win": "x86_64-win64", - "lin": "x86_64-linux", - "osx": "x86_64-darwin" - }' config: '{ "app-name": "helloworld", "lpi-path": "src", @@ -43,8 +36,6 @@ jobs: name: Test Application uses: gcarreno/re-usable-workflows/.github/workflows/test.lazarus.yml@main with: - app-name: helloworldtest - lpi-path: tests config: '{ "app-name": "helloworld", "lpi-path": "tests", diff --git a/.github/workflows/test.lazarus.yml b/.github/workflows/test.lazarus.yml index 1ab1c42..fe67184 100644 --- a/.github/workflows/test.lazarus.yml +++ b/.github/workflows/test.lazarus.yml @@ -8,14 +8,6 @@ on: workflow_call: inputs: - app-name: - description: Application Name - required: true - type: string - lpi-path: - description: Path to the "*.lpi" file - required: true - type: string config: description: A JSON object containing configuration values required: true @@ -43,8 +35,8 @@ jobs: steps: - name: Print some values run: | - echo App Name: ${{ inputs.app-name }} - echo LPI Path: ${{ inputs.lpi-path }}/${{ inputs.app-name }}.lpi + echo App Name: ${{ fromJSON(inputs.config).app-name }} + echo LPI Path: ${{ fromJSON(inputs.config).lpi-path }}/${{ fromJSON(inputs.config).app-name }}.lpi echo Matrix OS: ${{ matrix.os }} echo Executable: ${{ env._EXE_ }} echo Config: ${{ inputs.config }}