Skip to content

fix: disable http probe #9

fix: disable http probe

fix: disable http probe #9

name: Publish Docker Image to GHCR
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and tag Docker image
run: |
docker build -t ghcr.io/${{ github.repository }}:latest .
- name: Install Slim Toolkit
run: |
wget https://github.com/slimtoolkit/slim/releases/download/1.40.11/dist_linux.tar.gz
tar -xzf dist_linux.tar.gz
sudo cp dist_linux/* /usr/local/bin/
- name: Slim Docker image
run: |
docker-slim build --tag ghcr.io/${{ github.repository }}:slim ghcr.io/${{ github.repository }}:latest --http-probe=false --continue-after=30
- name: Push Docker image to GHCR
run: |
docker push ghcr.io/${{ github.repository }}:latest
docker push ghcr.io/${{ github.repository }}:slim