Skip to content

Commit 9c48c8b

Browse files
committedDec 5, 2024
ci: add capability to handle container initialisation steps to sync.py
1 parent 78be2f1 commit 9c48c8b

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed
 

‎.github/workflows/__test-proxy.yml

+11-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pr-checks/checks/test-proxy.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@ versions: ["linked", "nightly-latest"]
44
operatingSystems: ["ubuntu"]
55
container:
66
image: ubuntu:22.04
7-
options: --dns 127.0.0.1
7+
options: --dns 8.8.8.8
8+
container-init-steps:
9+
name: Set up GitHub CLI
10+
run: |
11+
apt update
12+
apt install -y curl libreadline8 gnupg2 software-properties-common zstd
13+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
14+
apt-key add /usr/share/keyrings/githubcli-archive-keyring.gpg
15+
apt-add-repository https://cli.github.com/packages
16+
apt install -y gh
17+
env: {}
818
services:
919
squid-proxy:
1020
image: ubuntu/squid:latest

‎pr-checks/sync.py

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ def writeHeader(checkStream):
124124
},
125125
]
126126

127+
# If container initialisation steps are present in the check specification,
128+
# make sure to execute them first.
129+
if 'container' in checkSpecification and 'container-init-steps' in checkSpecification:
130+
steps.insert(0, checkSpecification['container-init-steps'])
131+
132+
127133
steps.extend(checkSpecification['steps'])
128134

129135
checkJob = {

0 commit comments

Comments
 (0)
Please sign in to comment.