CI ubuntu verify external installation #2069
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI ubuntu verify external installation | |
'on': | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 * * * *' | |
jobs: | |
fetch_installations_externally: | |
runs-on: ubuntu-latest | |
outputs: | |
cm_versions: ${{ steps.extract-versions.outputs.cm_versions }} | |
steps: | |
- name: Install maintainer publickey | |
run: curl -s --compressed https://wibu-packages.vorausrobotik.com/ubuntu/wibu-packages-maintainers.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/wibu-packages-maintainers.gpg | |
- name: Add local repo to APT sources | |
run: echo "deb [signed-by=/etc/apt/trusted.gpg.d/wibu-packages-maintainers.gpg] https://wibu-packages.vorausrobotik.com/ubuntu/ ./" | sudo tee /etc/apt/sources.list.d/voraus-wibu.list | |
- name: update apt | |
run: sudo apt-get update | |
- name: Get available versions of c-lite | |
id: get_versions | |
run: | | |
apt-cache madison codemeter-lite | grep "https://wibu-packages.vorausrobotik.com/ubuntu" | awk '{print $3}' > versions.txt | |
cat versions.txt | |
- name: Extract lines from versions.txt | |
id: extract-versions | |
run: | | |
versions=$(cat versions.txt | jq -R -s -c 'split("\n") | map(select(. != ""))') | |
echo "cm_versions=$versions" >> $GITHUB_OUTPUT | |
package_is_installable_externally: | |
runs-on: ubuntu-latest | |
needs: fetch_installations_externally | |
strategy: | |
matrix: | |
version: ${{ fromJson(needs.fetch_installations_externally.outputs.cm_versions) }} | |
steps: | |
- name: Install maintainer publickey | |
run: curl -s --compressed https://wibu-packages.vorausrobotik.com/ubuntu/wibu-packages-maintainers.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/wibu-packages-maintainers.gpg | |
- name: Add local repo to APT sources | |
run: echo "deb [signed-by=/etc/apt/trusted.gpg.d/wibu-packages-maintainers.gpg] https://wibu-packages.vorausrobotik.com/ubuntu/ ./" | sudo tee /etc/apt/sources.list.d/voraus-wibu.list | |
- name: Update apt | |
run: sudo apt-get update | |
- name: Install codemeter-lite in version ${{ matrix.version }} | |
run: sudo apt-get install -y codemeter-lite=${{ matrix.version }} | |
- name: Codemeter is running | |
run: systemctl status codemeter | |
- name: Codemeter version output is expected | |
run: cmu --version | grep -q '${{ matrix.version }}' | |
- name: Verify codemeter service is running as daemon user | |
run: systemctl show -pUser codemeter.service | grep -qx User=daemon |