Skip to content

Build and Push

Build and Push #88

Workflow file for this run

name: Build and Push
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for the Docker image (or version tag)'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get docker-slim
run: |
curl -L -o ds.tar.gz https://downloads.dockerslim.com/releases/1.40.8/dist_linux.tar.gz
tar -xvzf ds.tar.gz
mv dist_linux/* $GITHUB_WORKSPACE
rm -rfv ds.tar.gz dist_linux/
- name: Build starter images
run: |
cd $GITHUB_WORKSPACE/docker
docker build --build-arg="GMOD_BRANCH=live" --tag gluatest_fat_live:latest .
# docker build --build-arg="GMOD_BRANCH=x86-64" --tag gluatest_fat_x86-64:latest .
- name: Make slim images
run: |
cd $GITHUB_WORKSPACE/docker
$GITHUB_WORKSPACE/docker-slim build \
--target gluatest_fat_live:latest \
--http-probe-off \
--dockerfile Dockerfile \
--dockerfile-context . \
--continue-after 15 \
--tag ghcr.io/cfc-servers/gluatest:${{ inputs.tag_name }}
# $GITHUB_WORKSPACE/docker-slim build \
# --target gluatest_fat_x86-64:latest \
# --http-probe-off \
# --dockerfile Dockerfile \
# --dockerfile-context . \
# --continue-after 15 \
# --tag ghcr.io/cfc-servers/gluatest/64bit:${{ inputs.tag_name }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Tag and push slim images
run: |
docker push ghcr.io/cfc-servers/gluatest --all-tags
# docker push ghcr.io/cfc-servers/gluatest/64bit --all-tags