Skip to content

Commit 3b2b47b

Browse files
committed
fix invalid files
1 parent 0c67263 commit 3b2b47b

2 files changed

Lines changed: 12 additions & 19 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,7 @@ jobs:
3434
rm -rf dist
3535
python -m build --wheel
3636
37-
WHEEL_PATH=$(ls dist/*.whl)
38-
WHEEL_VERSION=$(python - <<'PY'
39-
from pathlib import Path
40-
41-
wheel = next(Path("dist").glob("*.whl")).name
42-
print(wheel.split("-")[1].replace("_", "-"))
43-
PY
44-
)
37+
WHEEL_VERSION=$(python -c 'from pathlib import Path; wheel = next(Path("dist").glob("*.whl")).name; print(wheel.split("-")[1].replace("_", "-"))')
4538
4639
if [ "$WHEEL_VERSION" != "$RELEASE_TAG" ]; then
4740
echo "Wheel version $WHEEL_VERSION does not match release tag $RELEASE_TAG"

.github/workflows/publish_docker.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,8 @@ jobs:
5151
- name: Determine compose-runner version and Docker tags
5252
id: version
5353
run: |
54-
VERSION=$(python - <<'PY'
55-
from pathlib import Path
56-
57-
wheel = next(Path("dist").glob("*.whl")).name
58-
print(wheel.split("-")[1].replace("_", "-"))
59-
PY
60-
)
61-
DOCKER_TAG="${VERSION//+/-}"
54+
VERSION=$(python -c 'from pathlib import Path; wheel = next(Path("dist").glob("*.whl")).name; print(wheel.split("-")[1].replace("_", "-"))')
55+
DOCKER_TAG=$(printf '%s' "$VERSION" | tr '+' '-')
6256
6357
if [[ "${GITHUB_REF_TYPE}" == "tag" && "${GITHUB_REF_NAME}" != "${VERSION}" ]]; then
6458
echo "Wheel version ${VERSION} does not match git tag ${GITHUB_REF_NAME}"
@@ -67,6 +61,14 @@ PY
6761
6862
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
6963
echo "docker_tag=${DOCKER_TAG}" >> "$GITHUB_OUTPUT"
64+
{
65+
echo "tags<<EOF"
66+
echo "ghcr.io/neurostuff/nsc-runner:${DOCKER_TAG}"
67+
if [[ "${GITHUB_REF_NAME}" == "main" ]]; then
68+
echo "ghcr.io/neurostuff/nsc-runner:latest"
69+
fi
70+
echo "EOF"
71+
} >> "$GITHUB_OUTPUT"
7072
7173
- name: Build and push Docker image
7274
uses: docker/build-push-action@v7
@@ -75,6 +77,4 @@ PY
7577
push: true
7678
build-args: |
7779
COMPOSE_RUNNER_VERSION=${{ steps.version.outputs.version }}
78-
tags: |
79-
ghcr.io/neurostuff/nsc-runner:${{ steps.version.outputs.docker_tag }}
80-
ghcr.io/neurostuff/nsc-runner:${{ github.ref_name == 'main' && 'latest' || steps.version.outputs.docker_tag }}
80+
tags: ${{ steps.version.outputs.tags }}

0 commit comments

Comments
 (0)