Skip to content

updates

updates #1

name: Build and Push
on:
push:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Get the version
id: get_version
run: |
cd $GITHUB_WORKSPACE
echo ::set-output name=VERSION::$(git describe --abbrev=0 --tags `git rev-list --tags --max-count=1`)
- name: Get docker-slim
run: |
curl -L -o ds.tar.gz https://downloads.dockerslim.com/releases/1.37.6/dist_linux.tar.gz
tar -xvzf ds.tar.gz
mv dist_linux/* $GITHUB_WORKSPACE
rm -rfv ds.tar.gz dist_linux/
- name: Build starter image
run: |
cd $GITHUB_WORKSPACE/docker
docker build -t gluatest_fat:latest .
- name: Make slim image
run: |
cd $GITHUB_WORKSPACE/docker
touch fail.json
touch custom.cfg
$GITHUB_WORKSPACE/docker-slim build \
--target gluatest_fat:latest \
--http-probe-off \
--dockerfile Dockerfile \
--dockerfile-context . \
--continue-after 15 \
--tag ghcr.io/zeeptin/gluatest:latest \
--tag ghcr.io/zeeptin/gluatest:${{ steps.get_version.outputs.VERSION }}
- name: Tag and push slim images
run: |
docker push ghcr.io/zeeptin/gluatest --all-tags