Fix Linux Tentacle release job: artifact download fails due to unfiltered Docker build cache artifact
The release job was downloading all workflow artifacts — including the Docker buildx cache artifact (SolarifyDev~Squid~X2F9Y3.dockerbuild) — because no pattern filter was set. The two tentacle artifacts downloaded fine; the Docker cache artifact failed after 5 retries and killed the job. download-artifact@v4.3.0 also runs on deprecated Node.js 20.
Changes
-
pattern: squid-tentacle-*added todownload-artifactstep — restricts download to the two intended artifacts, excluding Docker build cache artifacts -
actions/download-artifact@v4.3.0→@v4— picks up current Node 24-compatible release
# Before
- uses: actions/download-artifact@v4.3.0
with:
path: artifacts
merge-multiple: true
# After
- uses: actions/download-artifact@v4
with:
path: artifacts
pattern: squid-tentacle-*
merge-multiple: true
Upload step and release glob (artifacts/squid-tentacle-*.tar.gz) are unchanged — all 4 release assets (versioned + unversioned × x64/arm64) continue to be produced identically.
Original prompt
Update the GitHub Actions workflow in repository SolarifyDev/Squid to fix the failing artifact download in the Build & Publish Linux Tentacle workflow while preserving the current release behavior.
Context:
- The failing job is from workflow run
24502795101, job71645524802. - The failing workflow file is
.github/workflows/build-publish-linux-tentacle.yml. - The failure happens in the
releasejob duringactions/download-artifact, with the log error:Unable to download and extract artifact: Artifact download failed after 5 retries. - The release currently needs to continue producing the same set of release assets as today.
Required outcome:
- Preserve the current GitHub Release asset set for Linux Tentacle releases, including these 4 tar.gz files:
squid-tentacle-<version>-linux-x64.tar.gzsquid-tentacle-<version>-linux-arm64.tar.gzsquid-tentacle-linux-x64.tar.gzsquid-tentacle-linux-arm64.tar.gz
- Preserve existing release notes/body behavior and Docker/release semantics.
- Fix the artifact handling so the release job reliably downloads artifacts and publishes the same files.
Suggested direction:
- Keep generating both versioned and unversioned tar.gz files in
build-binary. - Change artifact upload/download handling so that each file is uploaded in a more reliable way, avoiding the current extraction/download failure.
- Prefer a minimally invasive workflow-only fix.
- Update artifact action versions if appropriate to Node 24-compatible/current patch versions.
- Ensure the final
softprops/action-gh-releasestep still uploads all 4 release tarballs.
Please implement the fix as a pull request in SolarifyDev/Squid.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is in the release job’s artifact download step, not in the build itself.
Root cause
In .github/workflows/build-publish-linux-tentacle.yml at release:
-
actions/download-artifact@v4.3.0fails with:Unable to download and extract artifact: Artifact download failed after 5 retries.
- The preceding log lines show two artifacts downloaded successfully, then extraction failed on another artifact.
That points to a problem with the uploaded artifact set, most likely caused by the current upload pattern in the build-binary job:
.github/workflows/build-publish-linux-tentacle.yml:168-172
- name: Upload artifact
uses: actions/upload-artifact@v4.6.2
with:
name: squid-tentacle-${{ matrix.rid }}
path: dist/squid-tentacle-*${{ matrix.rid }}.tar.gz
And earlier, each matrix leg creates two files matching that pattern:
.github/workflows/build-publish-linux-tentacle.yml:163-166
tar czf dist/squid-tentacle-${IMAGE_TAG}-${{ matrix.rid }}.tar.gz \
-C dist/${{ matrix.rid }} .
cp dist/squid-tentacle-${IMAGE_TAG}-${{ matrix.rid }}.tar.gz \
dist/squid-tentacle-${{ matrix.rid }}.tar.gz
So each uploaded artifact contains both:
squid-tentacle-<version>-linux-x64.tar.gzsquid-tentacle-linux-x64.tar.gz
and similarly for arm64.
This is unnecessary and increases the chance of archive/extraction issues during the later merged download step.
Fix
Upload only the versioned archive, and optionally stop using merge-multiple: true.
Recommended workflow change
Replace the upload step with:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: squid-tentacle-${{ matrix.rid }}
path: dist/squid-tentacle-${{ needs.resolve-tag.outputs.image_tag }}-${{ matrix.rid }}.tar.gz
Then update the release download step to keep artifacts separated:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
And update release files to include nested directories:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Squid Tentacle v${{ needs.resolve-tag.outputs.image_tag }}
prerelease: ${{ contains(needs.resolve-tag.outputs.image_tag, '-') }}
files: artifacts/**/squid-tentacle-*.tar.gz
generate_release_notes: true
Minimal patch
Here’s the focused change:
# build-binary
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: squid-tentacle-${{ matrix.rid }}
path: dist/squid-tentacle-${{ needs.resolve-tag.outputs.image_tag }}-${{ matrix.rid }}.tar.gz
# release
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Squid Tentacle v${{ needs.resolve-tag.outputs.image_ta...
</details>
<!-- START COPILOT CODING AGENT SUFFIX -->
*This pull request was created from Copilot chat.*
>