Skip to content

Commit 16fa71b

Browse files
stack72claude
andcommitted
fix: pin Deno Docker image and pass release version via job outputs
Pin the Dockerfile base image to denoland/deno:2.7.5 instead of :latest for reproducible builds. Replace gh release view in the docker job with an explicit job output from the release job, eliminating the possibility of picking up a different release tag. Addresses review feedback from #882. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5871ffe commit 16fa71b

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
release:
1818
name: Build and Release
1919
runs-on: ubuntu-latest
20+
outputs:
21+
version: ${{ steps.version.outputs.version }}
2022
# Only run on merged PRs (not closed without merge) or manual trigger
2123
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
2224

@@ -180,18 +182,17 @@ jobs:
180182
- name: Download Linux binaries from release
181183
env:
182184
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
185+
RELEASE_VERSION: ${{ needs.release.outputs.version }}
183186
run: |
184187
mkdir -p docker-build/linux-amd64 docker-build/linux-arm64
185-
# Find the release tag (use latest release since we just created it)
186-
LATEST_TAG=$(gh release view --json tagName -q .tagName)
187-
echo "Downloading binaries from release ${LATEST_TAG}"
188-
gh release download "${LATEST_TAG}" --pattern "swamp-linux-x86_64" --dir docker-build/linux-amd64
189-
gh release download "${LATEST_TAG}" --pattern "swamp-linux-aarch64" --dir docker-build/linux-arm64
188+
RELEASE_TAG="v${RELEASE_VERSION}"
189+
echo "Downloading binaries from release ${RELEASE_TAG}"
190+
gh release download "${RELEASE_TAG}" --pattern "swamp-linux-x86_64" --dir docker-build/linux-amd64
191+
gh release download "${RELEASE_TAG}" --pattern "swamp-linux-aarch64" --dir docker-build/linux-arm64
190192
mv docker-build/linux-amd64/swamp-linux-x86_64 docker-build/linux-amd64/swamp
191193
mv docker-build/linux-arm64/swamp-linux-aarch64 docker-build/linux-arm64/swamp
192194
chmod +x docker-build/linux-amd64/swamp docker-build/linux-arm64/swamp
193-
# Extract version from tag for Docker tagging
194-
echo "docker_tag=${LATEST_TAG#v}" >> "$GITHUB_ENV"
195+
echo "docker_tag=${RELEASE_VERSION}" >> "$GITHUB_ENV"
195196
196197
- name: Set up QEMU
197198
uses: docker/setup-qemu-action@v3

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM denoland/deno:latest
1+
FROM denoland/deno:2.7.5
22
COPY swamp /usr/local/bin/swamp
33
RUN chmod +x /usr/local/bin/swamp
44
WORKDIR /workspace

0 commit comments

Comments
 (0)