-
Notifications
You must be signed in to change notification settings - Fork 21
42 lines (40 loc) · 1.39 KB
/
images.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
name: Images List
on:
workflow_call:
outputs:
images:
description: "The full list of images to use, as a JSON array of imagename:tag"
value: ${{ jobs.images.outputs.images }}
main:
description: "The main image to use (earliest relevant version) to generate the installer XML file"
value: ${{ jobs.images.outputs.main }}
env:
name: |
iris-community
irishealth-community
jobs:
images:
runs-on: ubuntu-latest
outputs:
images: ${{ steps.set-matrix.outputs.images }}
main: ${{ steps.set-matrix.outputs.main }}
steps:
- name: Images list
id: set-matrix
run: |
images=""
for n in $name; do
tags=$(curl -su ":" https://containers.intersystems.com/v2/intersystems/${n}/tags/list | jq -r '.tags[]' | awk '!/(-linux)|([1-4]-preview)|(-em)|(-cd)/' | awk '!/\.[1-4]\./' | sort | uniq)
for tag in $tags
do
# Skip irishealth-community due to bad interaction with ZPM document type
# Also skip 2023.2 because the license has expired
if [ "$tag" = "2023.3" -o "$tag" = "2023.2" ];
then
continue
fi
images+='"'${n}:${tag}'",';
done
done;
echo images="[${images%?}]" >> $GITHUB_OUTPUT
echo main=${images%%,*} >> $GITHUB_OUTPUT