-
Notifications
You must be signed in to change notification settings - Fork 3
106 lines (94 loc) · 3.19 KB
/
build-sim_telarray.yml
File metadata and controls
106 lines (94 loc) · 3.19 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
name: build-simtel_array
# Build and push sim_telarray images.
#
# The images are built and pushed when manually triggered (workflow_dispatch).
#
on:
workflow_dispatch:
pull_request:
paths:
- docker/Dockerfile-simtel_array
schedule:
- cron: '0 0 1 * *' # Every 1st day of the month at 00:00 UTC (build only)
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
CLOUD_URL: "https://syncandshare.desy.de/index.php/s/"
permissions:
contents: read
jobs:
download-auxiliary-files:
runs-on: ubuntu-latest
steps:
- name: download-auxiliary-files
run: |
curl -L --fail \
--retry 5 --retry-delay 10 --retry-connrefused \
--connect-timeout 30 \
"${{ env.CLOUD_URL }}/${{ secrets.CLOUD_GSL }}/download" \
-o gsl.tar.gz
- name: upload-auxiliary-files
uses: actions/upload-artifact@v7
with:
name: upload-auxiliary-files
path: |
gsl.tar.gz
retention-days: 1
build-sim_telarray:
runs-on: ubuntu-latest
needs: [download-auxiliary-files]
permissions:
contents: read
packages: write
strategy:
matrix:
version:
- {simtel_version: 'v2025-11-30-rc', hessio_version: 'v2025-12-01-rc', stdtools_version: 'v2025-06-16-rc'}
env:
BASE_LABEL: "sim_telarray"
BASE_TAG: "${{ matrix.version.simtel_version }}"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Download auxiliary files
uses: actions/download-artifact@v8
with:
name: upload-auxiliary-files
path: .
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to the Container registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v6
with:
tags: |
type=raw,value=${{ env.BASE_TAG }}
type=ref,event=pr,suffix=-${{ env.BASE_TAG }}
type=semver,pattern={{major}}.{{minor}}.{{patch}}-${{ env.BASE_TAG }}
type=schedule,pattern={{date 'YYYYMMDD'}}-${{ env.BASE_TAG }}
images: ${{ env.REGISTRY }}/gammasim/${{ env.BASE_LABEL }}
flavor: latest=true
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
platforms: 'linux/amd64,linux/arm64/v8'
build-args: |
SIMTEL_VERSION=${{ matrix.version.simtel_version }}
HESSIO_VERSION=${{ matrix.version.hessio_version }}
STDTOOLS_VERSION=${{ matrix.version.stdtools_version }}
secrets: |
sim_telarray_token=${{ secrets.SIMTELARRAY_CTAO_GITLAB }}
hessio_token=${{ secrets.HESSIO_CTAO_GITLAB }}
stdtools_token=${{ secrets.STDTOOLS_CTAO_GITLAB }}
push: ${{ github.event_name == 'workflow_dispatch' }}
file: ./docker/Dockerfile-simtel_array
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}