Skip to content

Example (restrict mode) #2

Example (restrict mode)

Example (restrict mode) #2

name: Example (restrict)
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Start buildcage builder
id: buildcage
uses: dash14/buildcage/setup@main
with:
proxy_mode: restrict
allowed_https_domains: registry.npmjs.org
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: ${{ steps.buildcage.outputs.endpoint }}
- name: Create test Dockerfile
run: |
mkdir -p /tmp/build-context
cat <<'EOF' > /tmp/build-context/Dockerfile
FROM node:24-alpine
WORKDIR /app
RUN npm init -y && npm install express
RUN wget -q -O /dev/null --timeout=5 https://example.com/ || true
EOF
- name: Build test image
uses: docker/build-push-action@v6
with:
context: /tmp/build-context
push: false
no-cache: true
- name: Show proxy report
if: always()
uses: dash14/buildcage/report@main
with:
fail_on_blocked: false