fix: standardize CI workflow to unified pattern #3
+13
-10
@@ -42,17 +42,15 @@ jobs:
|
|||||||
needs: verify
|
needs: verify
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
runs-on: golang
|
runs-on: golang
|
||||||
container:
|
|
||||||
image: docker:27-cli
|
|
||||||
volumes:
|
|
||||||
- /docker-certs/client:/docker-certs/client:ro
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: tcp://localhost:2376
|
|
||||||
DOCKER_TLS_VERIFY: "1"
|
|
||||||
DOCKER_CERT_PATH: /docker-certs/client
|
|
||||||
steps:
|
steps:
|
||||||
- name: install node (required by JS-based actions)
|
- name: Install dependencies
|
||||||
run: apk add --no-cache nodejs git
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
docker.io \
|
||||||
|
nodejs \
|
||||||
|
git
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -81,3 +79,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
|
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
|
||||||
docker push "${IMAGE}:latest"
|
docker push "${IMAGE}:latest"
|
||||||
|
echo "✓ Image pushed: ${IMAGE}:${{ steps.sha.outputs.short_sha }}"
|
||||||
|
|
||||||
|
- name: Prune unused images
|
||||||
|
run: |
|
||||||
|
docker image prune -a --force 2>&1 | tail -3 || true
|
||||||
|
|||||||
Reference in New Issue
Block a user