Skip to content

Bump crazy-max/ghaction-github-labeler from 4 to 5 #68

Bump crazy-max/ghaction-github-labeler from 4 to 5

Bump crazy-max/ghaction-github-labeler from 4 to 5 #68

Workflow file for this run

name: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- 'master'
paths-ignore:
- '**.md'
push:
branches:
- 'master'
paths-ignore:
- '**.md'
env:
BUILD_TAG: csgo-server-launcher:test
CONTAINER_NAME: csgo-server-launcher
jobs:
install:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
- 'debian:buster'
- 'debian:bullseye'
- 'ubuntu:20.04'
- 'ubuntu:22.04'
- 'ubuntu:23.04'
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Create Dockerfile
run: |
mkdir -p test-install
cp install.sh ./test-install/
cat > ./test-install/Dockerfile <<EOL
FROM ${{ matrix.variant }}
COPY install.sh /install.sh
ENV CSGOSL_VERSION=dev
ENV CSGOSL_DOWNLOAD_URL=https://raw.githubusercontent.com/crazy-max/csgo-server-launcher/master
RUN /install.sh
EOL
-
name: Test
uses: docker/build-push-action@v4
with:
context: ./test-install
outputs: type=cacheonly
docker:
runs-on: ubuntu-22.04
steps:
-
name: Free up disk space
run: |
#sudo du -h -S / | sort -rh
sudo rm -rf /opt/google/chrome /opt/microsoft/msedge /usr/local/julia* /usr/share/dotnet /opt/hostedtoolcache /usr/local/lib/android/sdk
-
name: Checkout
uses: actions/checkout@v3
-
name: Build
uses: docker/bake-action@v3
with:
targets: image-local
env:
DEFAULT_TAG: ${{ env.BUILD_TAG }}
-
name: Start container
run: |
docker run -d --name ${{ env.CONTAINER_NAME }} \
--ulimit nproc=65535 \
--ulimit nofile=32000:40000 \
-p 27015:27015 \
-p 27015:27015/udp \
${{ env.BUILD_TAG }}
-
name: Check container logs
uses: crazy-max/.github/.github/actions/container-logs-check@main
with:
container_name: ${{ env.CONTAINER_NAME }}
log_check: "Host_NewGame on map "
timeout: 2400
-
name: Container logs
if: always()
run: |
docker logs ${{ env.CONTAINER_NAME }}
docker rm -f ${{ env.CONTAINER_NAME }} > /dev/null 2>&1 || true