diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 8fd3ddc..6233f8c 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -7,10 +7,12 @@ on: jobs: setup-codesys: - runs-on: windows-latest + runs-on: windows-latest-core8 steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup CODESYS - uses: ./ \ No newline at end of file + uses: ./ + with: + cinstaller-version: 2.2.2 \ No newline at end of file diff --git a/action.yml b/action.yml index 7707968..471ac6b 100644 --- a/action.yml +++ b/action.yml @@ -6,9 +6,6 @@ branding: icon: 'package' color: 'red' -#INSTALLER_BASE_URL: https://store-archive.codesys.com/ftp_download/3S/Installer/000127/ -#INSTALLER_DIR: C:\Program Files (x86)\CODESYS\APInstaller - inputs: installer-version: description: 'The version of the CODESYS installer to use' @@ -18,11 +15,19 @@ inputs: runs: using: composite steps: + - name: Set globals + id: globals + shell: pwsh + run: | + echo "BASE_URL_INSTALLER=https://store-archive.codesys.com/ftp_download/3S/Installer/000127" >> $env:GITHUB_OUTPUT + echo "INSTALLER_VERSION=${{ inputs.installer-version }}" >> $env:GITHUB_OUTPUT + echo "INSTALLER_DIR=C:\Program Files (x86)\CODESYS\APInstaller" >> $env:GITHUB_OUTPUT + - name: Download installer shell: bash run: | - base_url="https://store-archive.codesys.com/ftp_download/3S/Installer/000127" - version="${{ inputs.installer-version }}" + base_url=${{ steps.globals.outputs.BASE_URL_INSTALLER }} + version=${{ steps.globals.outputs.INSTALLER_VERSION }} curl "${base_url}/${version}/CODESYS%20Installer%20${version}.exe" -o installer.exe - name: Install CODESYS installer @@ -34,7 +39,7 @@ runs: - name: Update Installer shell: pwsh run: | - cd "C:\Program Files (x86)\CODESYS\APInstaller" + cd "${{ steps.globals.outputs.INSTALLER_DIR }}" .\APInstaller.CLI.exe --selfUpdate if ($LASTEXITCODE -eq 1) { Write-Host "No update available. Exiting with code 0 as success."