Skip to content

Commit e8b645b

Browse files
committed
.github: workflows: Specify Hetzner Ubuntu mirrors for all image builds
Custom APT mirror URIs are now required to be specified for each image build because the source overrides in the base image no longer persist. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 758f6dd commit e8b645b

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,34 @@ jobs:
139139
echo "EOF"
140140
} >> $GITHUB_OUTPUT
141141
142+
- name: Generate CI image build arguments
143+
id: buildarg_ci
144+
run: |
145+
{
146+
echo "args<<EOF"
147+
echo "BASE_IMAGE=${{ env.GHCR_BASE }}/${{ env.BASE_IMAGE_NAME }}:${{ steps.meta_base.outputs.version }}"
148+
if [ "${ZEPHYR_RUNNER_CLOUD_PROVIDER}" == "Hetzner" ]; then
149+
echo "UBUNTU_MIRROR_ARCHIVE=mirror.hetzner.com/ubuntu/packages"
150+
echo "UBUNTU_MIRROR_SECURITY=mirror.hetzner.com/ubuntu/security"
151+
echo "UBUNTU_MIRROR_PORTS=mirror.hetzner.com/ubuntu-ports/packages"
152+
fi
153+
echo "EOF"
154+
} >> $GITHUB_OUTPUT
155+
156+
- name: Generate Developer image build arguments
157+
id: buildarg_developer
158+
run: |
159+
{
160+
echo "args<<EOF"
161+
echo "BASE_IMAGE=${{ env.GHCR_BASE }}/${{ env.CI_IMAGE_NAME }}:${{ steps.meta_ci.outputs.version }}"
162+
if [ "${ZEPHYR_RUNNER_CLOUD_PROVIDER}" == "Hetzner" ]; then
163+
echo "UBUNTU_MIRROR_ARCHIVE=mirror.hetzner.com/ubuntu/packages"
164+
echo "UBUNTU_MIRROR_SECURITY=mirror.hetzner.com/ubuntu/security"
165+
echo "UBUNTU_MIRROR_PORTS=mirror.hetzner.com/ubuntu-ports/packages"
166+
fi
167+
echo "EOF"
168+
} >> $GITHUB_OUTPUT
169+
142170
- name: Build base image
143171
uses: redhat-actions/buildah-build@v2
144172
with:
@@ -155,8 +183,7 @@ jobs:
155183
containerfiles: Dockerfile.ci
156184
tags: ${{ steps.meta_ci.outputs.tags }}
157185
labels: ${{ steps.meta_ci.outputs.labels }}
158-
build-args: |
159-
BASE_IMAGE=${{ env.GHCR_BASE }}/${{ env.BASE_IMAGE_NAME }}:${{ steps.meta_base.outputs.version }}
186+
build-args: ${{ steps.buildarg_ci.outputs.args }}
160187
extra-args: |
161188
--pull-never
162189
@@ -167,8 +194,7 @@ jobs:
167194
containerfiles: Dockerfile.devel
168195
tags: ${{ steps.meta_developer.outputs.tags }}
169196
labels: ${{ steps.meta_developer.outputs.labels }}
170-
build-args: |
171-
BASE_IMAGE=${{ env.GHCR_BASE }}/${{ env.CI_IMAGE_NAME }}:${{ steps.meta_ci.outputs.version }}
197+
build-args: ${{ steps.buildarg_developer.outputs.args }}
172198
extra-args: |
173199
--pull-never
174200

0 commit comments

Comments
 (0)