Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Verify external installation on main #17

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/ci_ubuntu_verify_external_installation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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/burfeind_jan-niklas.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/burfeind_jan-niklas.gpg
- name: Add local repo to APT sources
run: echo "deb [signed-by=/etc/apt/trusted.gpg.d/burfeind_jan-niklas.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
strategy:
matrix:
version: ${{ fromJson(needs.fetch_installations.outputs.cm_versions) }}
steps:
- name: Install maintainer publickey
run: curl -s --compressed https://wibu-packages.vorausrobotik.com/ubuntu/burfeind_jan-niklas.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/burfeind_jan-niklas.gpg
- name: Add local repo to APT sources
run: echo "deb [signed-by=/etc/apt/trusted.gpg.d/burfeind_jan-niklas.gpg] https://wibu-packages.vorausrobotik.com/wibu-packages/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