-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (65 loc) · 2.85 KB
/
ci_ubuntu_verify_installation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI ubuntu verify installation
'on':
workflow_call: null
jobs:
fetch_installations:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.extract-lines.outputs.versions }}
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Provide the repo locally via http
run: nohup python3 -m http.server 8080 &
working-directory: ./ubuntu/
- name: Install maintainer publickey
run: curl -s --compressed http://localhost:8080/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] http://localhost:8080 ./" | sudo tee /etc/apt/sources.list.d/localrepo.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 "http://localhost:8080" | awk '{print $3}' > versions.txt
cat versions.txt
- name: Trigger downstream jobs for each version
run: |
BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
while read version; do
echo "Triggering installation for version $version"
gh workflow run ci_ubuntu_verify_installation.yml -f package_version=$version --ref $BRANCH_NAME
done < versions.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Kill the webserver again
run: sudo pkill python3
- name: Extract lines from versions.txt
id: extract-lines
run: |
versions=$(cat versions.txt | tr '\n' ',')
echo "::set-output name=versions::${versions}"
package_is_installable:
runs-on: ubuntu-latest
needs: fetch_installations
strategy:
matrix:
version: ${{ fromJson(needs.prepare-matrix.outputs.lines) }}
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Provide the repo locally via http
run: nohup python3 -m http.server 8080 &
working-directory: ./ubuntu/
- name: Install maintainer publickey
run: curl -s --compressed http://localhost:8080/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] http://localhost:8080 ./" | sudo tee /etc/apt/sources.list.d/localrepo.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: Kill the webserver again
run: sudo pkill python3
- name: Codemeter is running
run: systemctl status codemeter