Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 1 addition & 62 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ runs:
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y podman skopeo
sudo apt-get install -y podman
podman --version

- name: Configure rootless Podman
Expand Down Expand Up @@ -286,67 +286,6 @@ runs:
shell: bash
run: "$GITHUB_ACTION_PATH/.github/scripts/install-openshell.sh"

- name: Restore cached sandbox image
id: sandbox-cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: /tmp/sandbox-image.tar
key: sandbox-image-${{ runner.os }}-${{ runner.arch }}-${{ env.FULLSEND_SANDBOX_IMAGE || 'ghcr.io/fullsend-ai/fullsend-code:latest' }}
restore-keys: |
sandbox-image-${{ runner.os }}-${{ runner.arch }}-

- name: Load cached sandbox image
if: steps.sandbox-cache.outputs.cache-hit == 'true'
shell: bash
run: podman load -i /tmp/sandbox-image.tar || echo "::warning::Cached image load failed; will pull fresh"

- name: Pre-pull sandbox image
id: sandbox-pull
shell: bash
run: |
IMAGE="${FULLSEND_SANDBOX_IMAGE:-ghcr.io/fullsend-ai/fullsend-code:latest}"
echo "Pre-pulling sandbox image: ${IMAGE}"

LOCAL_DIGEST="$(podman image inspect --format '{{.Digest}}' -- "${IMAGE}" 2>/dev/null || true)"

if [[ -n "${LOCAL_DIGEST}" ]]; then
# Check remote digest without pulling (~1s HEAD request).
REMOTE_DIGEST="$(skopeo inspect --no-tags --format '{{.Digest}}' "docker://${IMAGE}" 2>/dev/null || true)"
if [[ -z "${REMOTE_DIGEST}" ]]; then
echo "Could not fetch remote digest; falling through to pull"
elif [[ "${LOCAL_DIGEST}" == "${REMOTE_DIGEST}" ]]; then
echo "Local image is current (digest ${LOCAL_DIGEST:0:19}…); skipping pull"
exit 0
else
echo "Digest mismatch (local=${LOCAL_DIGEST:0:19}… remote=${REMOTE_DIGEST:0:19}…); pulling"
fi
fi

timeout 300 podman pull -- "${IMAGE}" || echo "::warning::Image pre-pull failed; sandbox create will pull on demand"
PULLED_DIGEST="$(podman image inspect --format '{{.Digest}}' -- "${IMAGE}" 2>/dev/null || true)"
if [[ "${LOCAL_DIGEST}" != "${PULLED_DIGEST}" ]]; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
fi

- name: Save sandbox image for cache
if: steps.sandbox-cache.outputs.cache-hit != 'true' || steps.sandbox-pull.outputs.changed == 'true'
shell: bash
run: |
IMAGE="${FULLSEND_SANDBOX_IMAGE:-ghcr.io/fullsend-ai/fullsend-code:latest}"
if podman image exists -- "${IMAGE}"; then
rm -f /tmp/sandbox-image.tar
podman save -o /tmp/sandbox-image.tar -- "${IMAGE}"
else
echo "::warning::Image not available to cache"
fi

- name: Update sandbox image cache
if: steps.sandbox-cache.outputs.cache-hit != 'true' || steps.sandbox-pull.outputs.changed == 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: /tmp/sandbox-image.tar
key: sandbox-image-${{ runner.os }}-${{ runner.arch }}-${{ env.FULLSEND_SANDBOX_IMAGE || 'ghcr.io/fullsend-ai/fullsend-code:latest' }}

- name: Install validation dependencies
shell: bash
run: pip install --quiet "jsonschema>=4.18.0"
Expand Down
Loading