Skip to content

Commit 2aa22ed

Browse files
committed
ci: install build deps from AL2023 S3 repo for VPC runners
The CodeBuild runners have no public internet egress, so the default cdn.amazonlinux.com mirrorlist is unreachable. Point dnf at the regional al2023-repos S3 bucket (reachable via the VPC's S3 gateway endpoint) and disable the image's unreachable third-party repos.
1 parent dd10063 commit 2aa22ed

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,22 @@ jobs:
4141

4242
steps:
4343
- name: Install prerequisites
44-
run: dnf install -y tar gzip git cmake ninja-build gcc-c++ openssl-devel libcurl-devel
44+
run: |
45+
# The CodeBuild runners live in a VPC with no public egress, so the
46+
# default cdn.amazonlinux.com mirrorlist (and the image's Corretto /
47+
# gh-cli / mono repos) can't be reached. Point dnf at the regional
48+
# AL2023 repo bucket, which is reachable via the VPC's S3 gateway
49+
# endpoint, and disable everything else.
50+
cat > /etc/yum.repos.d/al2023-s3.repo <<'EOF'
51+
[al2023-s3]
52+
name=AL2023 core via S3 gateway endpoint
53+
mirrorlist=https://al2023-repos-eu-west-1.s3.dualstack.eu-west-1.amazonaws.com/core/mirrors/$releasever/$basearch/mirror.list
54+
gpgcheck=1
55+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2023
56+
enabled=1
57+
EOF
58+
dnf --disablerepo='*' --enablerepo='al2023-s3' install -y \
59+
tar gzip git cmake ninja-build gcc-c++ openssl-devel libcurl-devel
4560
4661
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4762
with:

0 commit comments

Comments
 (0)