-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 2.69 KB
/
Copy pathrelease-examples.yml
File metadata and controls
71 lines (63 loc) · 2.69 KB
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
66
67
68
69
70
71
name: Release examples
# E2E smoke test: build + publish (to an ephemeral on-runner local repo) every
# example for every distro. Packages are not installed; pass/fail signal is
# whether `omnipackage release` exits cleanly. GPG and TOP_SECRET_KEY are
# generated inside each job by release_examples.sh — no external secrets.
on:
workflow_dispatch:
inputs:
example:
description: "Single example to release (blank = all)"
required: false
default: ""
distro:
description: "Single distro to release (blank = all)"
required: false
default: ""
schedule:
- cron: '17 0 1 * *' # 00:17 UTC on the 1st of each month (02:17 UTC+2, night)
jobs:
list-distros:
runs-on: ubuntu-24.04
outputs:
distros: ${{ steps.distros.outputs.distros }}
steps:
- name: Install omnipackage
run: |
echo 'deb https://repositories.omnipackage.org/omnipackage-rs/master/ubuntu_24.04 stable/' | sudo tee /etc/apt/sources.list.d/omnipackage_omnipackage.list
curl -fsSL https://repositories.omnipackage.org/omnipackage-rs/master/ubuntu_24.04/stable/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/omnipackage_omnipackage.gpg > /dev/null
sudo apt-get update
sudo apt-get install omnipackage
- uses: actions/checkout@v6
- id: distros
run: |
if [[ -n "${{ inputs.distro }}" ]]; then
echo "distros=[\"${{ inputs.distro }}\"]" >> "$GITHUB_OUTPUT"
else
echo "distros=$(omnipackage info --list-distros c_makefile --format json)" >> "$GITHUB_OUTPUT"
fi
release:
needs: [list-distros]
runs-on: ubuntu-24.04
concurrency:
group: release-examples-${{ matrix.distro }}
cancel-in-progress: false
strategy:
fail-fast: false
matrix:
distro: ${{ fromJson(needs.list-distros.outputs.distros) }}
steps:
- name: Install omnipackage
run: |
echo 'deb https://repositories.omnipackage.org/omnipackage-rs/master/ubuntu_24.04 stable/' | sudo tee /etc/apt/sources.list.d/omnipackage_omnipackage.list
curl -fsSL https://repositories.omnipackage.org/omnipackage-rs/master/ubuntu_24.04/stable/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/omnipackage_omnipackage.gpg > /dev/null
sudo apt-get update
sudo apt-get install omnipackage
- uses: actions/checkout@v6
- name: Release all examples for ${{ matrix.distro }}
run: |
args=(--distro "${{ matrix.distro }}")
if [[ -n "${{ inputs.example }}" ]]; then
args+=(--example "${{ inputs.example }}")
fi
./release_examples.sh "${args[@]}"