Skip to content

Commit 09bde51

Browse files
committed
Fix Python version extraction regex for docker-borgmatic Dockerfile
docker-borgmatic's Dockerfile now sets the Python version via ARG PYTHON_VERSION instead of hardcoding it in the FROM line, so the old regex matched nothing and failed the setup job (exit 1 under bash -e).
1 parent 3d66052 commit 09bde51

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
id: python_version
1919
run: |
2020
DOCKERFILE=$(curl -sf "https://raw.githubusercontent.com/modem7/docker-borgmatic/master/Dockerfile")
21-
PY_VERSION=$(echo "$DOCKERFILE" | grep -oP '(?<=FROM python:)\d+\.\d+')
21+
PY_VERSION=$(echo "$DOCKERFILE" | grep -oP '(?<=^ARG PYTHON_VERSION=)\d+\.\d+')
2222
CP_TAG="cp$(echo "$PY_VERSION" | tr -d '.')"
2323
echo "py_version=$PY_VERSION" >> $GITHUB_OUTPUT
2424
echo "cp_tag=$CP_TAG" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)