Skip to content

Commit

Permalink
(Workflow) Ongoing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRohn committed Mar 19, 2024
1 parent f725e1c commit 0e59307
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ./
uses: ./
with:
cinstaller-version: 2.2.2
17 changes: 11 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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."
Expand Down

0 comments on commit 0e59307

Please sign in to comment.