Skip to content

Commit d74c9cc

Browse files
authored
Merge pull request #1179 from radian-software/rr-docker-ratelimits
Resolve Docker Hub rate limits
2 parents 7e3d8a0 + d80c077 commit d74c9cc

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

.github/workflows/ci.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,21 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
emacs_version: [25, 26, 27, 28]
13+
emacs_version: [25, 26, 27, 28, 29]
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17+
- name: GHCR login
18+
uses: docker/login-action@v3
19+
with:
20+
registry: ghcr.io
21+
username: ${{ github.actor }}
22+
password: ${{ secrets.GITHUB_TOKEN }}
1723
- name: CI
1824
env:
1925
VERSION: ${{ matrix.emacs_version }}
2026
run: >-
21-
make docker CMD="make -k compile checkdoc longlines test smoke"
27+
make docker
28+
CMD="make -k compile checkdoc longlines test smoke"
29+
DOCKER_BASE=ghcr.io/radian-software/emacs-base
30+
NO_SUDO_DOCKER=1

Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
ARG VERSION
2-
FROM silex/emacs:$VERSION
1+
ARG BASE=silex/emacs
2+
ARG VERSION=29
3+
FROM $BASE:$VERSION
34

45
ARG UID
56

scripts/docker.bash

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
set -e
44
set -o pipefail
55

6-
tag="${1:-latest}"
6+
tag="${1:-29}"
77

88
args=(bash)
99
if [[ -n "$2" ]]; then
1010
args=("${args[@]}" -c "$2")
1111
fi
1212

1313
docker() {
14-
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
14+
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]] \
15+
&& [[ -z "${NO_SUDO_DOCKER:-}" ]]; then
1516
command sudo docker "$@"
1617
else
1718
command docker "$@"
@@ -20,7 +21,8 @@ docker() {
2021

2122
docker build . -t "straight.el:$tag" \
2223
--build-arg "UID=$UID" \
23-
--build-arg "VERSION=$tag"
24+
--build-arg "VERSION=$tag" \
25+
--build-arg "BASE=${DOCKER_BASE:-silex/emacs}"
2426

2527
it=()
2628

0 commit comments

Comments
 (0)