Skip to content
This repository has been archived by the owner on Feb 21, 2025. It is now read-only.

ci: set contents read as default workflow permissions #95

ci: set contents read as default workflow permissions

ci: set contents read as default workflow permissions #95

Workflow file for this run

name: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
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:bullseye
- debian:bookworm
- ubuntu:20.04
- ubuntu:22.04
- ubuntu:24.04
steps:
-
name: Test
uses: docker/bake-action@v6
with:
targets: test-install
env:
TEST_BASE_IMAGE: ${{ matrix.variant }}
docker:
runs-on: ubuntu-22.04
steps:
-
name: Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
-
name: Build
uses: docker/bake-action@v6
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