Skip to content

Commit

Permalink
Switch to buildx bake
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Mar 9, 2021
1 parent aeaf2dc commit 0e84b6f
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 36 deletions.
4 changes: 0 additions & 4 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
name: ":pray: help wanted"
color: "4caf50"
description: ""
- # hold
name: ":hand: hold"
color: "24292f"
description: ""
- # invalid
name: ":no_entry_sign: invalid"
color: "e6e6e6"
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,19 @@ jobs:
images: |
${{ env.DOCKERHUB_SLUG }}
${{ env.GHCR_SLUG }}
tag-semver: |
{{version}}
tag-edge: true
tag-match: v(.*)
tag-match-group: 1
label-custom: |
org.opencontainers.image.title=CSGO Server Launcher
org.opencontainers.image.description=Create and launch your Counter-Strike Global Offensive Dedicated Server
org.opencontainers.image.vendor=CrazyMax
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: "--debug"
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
Expand All @@ -81,19 +83,13 @@ jobs:
password: ${{ secrets.GHCR_TOKEN }}
-
name: Build
uses: docker/build-push-action@v2
uses: docker/bake-action@v1
with:
context: .
file: ./Dockerfile
files: |
./docker-bake.hcl
${{ steps.docker_meta.outputs.bake-file }}
targets: image
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
build-args: |
VERSION=${{ steps.docker_meta.outputs.version }}
labels: |
${{ steps.docker_meta.outputs.labels }}
org.opencontainers.image.title=CSGO Server Launcher
org.opencontainers.image.description=Create and launch your Counter-Strike Global Offensive Dedicated Server
org.opencontainers.image.vendor=CrazyMax
-
name: Check manifest
if: github.event_name != 'pull_request'
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.15.2 (2021/03/09)

* Upstream Debian update
* Switch to buildx bake
* Publish to GHCR

## 1.15.1 (2020/06/22)

* Minor text improvement (#75)
Expand Down
14 changes: 5 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM debian:buster-slim

LABEL maintainer="CrazyMax"

RUN dpkg --add-architecture i386 \
Expand Down Expand Up @@ -35,19 +34,16 @@ ENV LANG="en_US.UTF-8" \
DIR_STEAMCMD="/var/steamcmd" \
DIR_ROOT="/var/steamcmd/games/csgo"

COPY csgo-server-launcher.sh /usr/bin/csgo-server-launcher
COPY csgo-server-launcher.conf /etc/csgo-server-launcher/csgo-server-launcher.conf
COPY entrypoint.sh /entrypoint.sh

RUN groupadd -f -g 1000 steam \
&& useradd -o --shell /bin/bash -u 1000 -g 1000 -m steam \
&& echo "steam ALL=(ALL)NOPASSWD: ALL" >> etc/sudoers \
&& mkdir -p ${DIR_STEAMCMD} ${DIR_ROOT} \
&& curl -sSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar -C ${DIR_STEAMCMD} -xvz \
&& chown -R steam. ${DIR_STEAMCMD}

COPY csgo-server-launcher.sh /usr/bin/csgo-server-launcher
COPY csgo-server-launcher.conf /etc/csgo-server-launcher/csgo-server-launcher.conf
COPY entrypoint.sh /entrypoint.sh

RUN chmod a+x /entrypoint.sh /usr/bin/csgo-server-launcher \
&& chown -R steam. /etc/csgo-server-launcher
&& chown -R steam. ${DIR_STEAMCMD} /etc/csgo-server-launcher

USER steam

Expand Down
4 changes: 2 additions & 2 deletions csgo-server-launcher.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

##################################################################################
# #
# CSGO Server Launcher v1.15.1 #
# CSGO Server Launcher v1.15.2 #
# #
# A simple script to launch your Counter-Strike : Global Offensive #
# Dedicated Server. #
# #
# Copyright (C) 2012-2020 CrazyMax #
# Copyright (C) 2012-2021 CrazyMax #
# #
# Counter-Strike : Global Offensive Server Launcher is free software; you can #
# redistribute it and/or modify it under the terms of the GNU Lesser General #
Expand Down
8 changes: 4 additions & 4 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Docker image 🐳 is available for CSGO Server Launcher. For usage and info, see
A script is available to perform an installation with a single command:

```
$ sudo curl -sSLk https://github.com/crazy-max/csgo-server-launcher/releases/download/v1.15.1/install.sh | sudo bash
$ sudo curl -sSLk https://github.com/crazy-max/csgo-server-launcher/releases/download/v1.15.2/install.sh | sudo bash
```

This should output something like this:

```
Starting CSGO Server Launcher install (v1.15.1)...
Starting CSGO Server Launcher install (v1.15.2)...
Adding i386 architecture...
Installing required packages...
Expand Down Expand Up @@ -51,11 +51,11 @@ Or you can install it manually as root or sudoer:
$ dpkg --add-architecture i386
$ apt-get update
$ apt-get install -y -q curl gdb libc?-i386 lib32stdc++? lib32gcc1 lib32ncurses? lib32z1 libsdl2-2.0-0:i386 screen tar
$ curl -sSLk https://github.com/crazy-max/csgo-server-launcher/releases/download/v1.15.1/csgo-server-launcher.sh -o /etc/init.d/csgo-server-launcher
$ curl -sSLk https://github.com/crazy-max/csgo-server-launcher/releases/download/v1.15.2/csgo-server-launcher.sh -o /etc/init.d/csgo-server-launcher
$ chmod +x /etc/init.d/csgo-server-launcher
$ update-rc.d csgo-server-launcher defaults
$ mkdir -p /etc/csgo-server-launcher/
$ curl -sSLk https://github.com/crazy-max/csgo-server-launcher/releases/download/v1.15.1/csgo-server-launcher.conf -o /etc/csgo-server-launcher/csgo-server-launcher.conf
$ curl -sSLk https://github.com/crazy-max/csgo-server-launcher/releases/download/v1.15.2/csgo-server-launcher.conf -o /etc/csgo-server-launcher/csgo-server-launcher.conf
```

> :warning: Replace lib32ncurses5 with lib32ncurses6 on Debian buster based distros
Expand Down
17 changes: 17 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Special target: https://github.com/crazy-max/ghaction-docker-meta#bake-definition
target "ghaction-docker-meta" {
tags = ["crazymax/diun:local"]
}

group "default" {
targets = ["image-local"]
}

target "image" {
inherits = ["ghaction-docker-meta"]
}

target "image-local" {
inherits = ["image"]
output = ["type=docker"]
}
Empty file modified entrypoint.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# #
# Installs CSGO Server Launcher #
# #
# Copyright (C) 2012-2020 CrazyMax #
# Copyright (C) 2012-2021 CrazyMax #
# #
# Counter-Strike : Global Offensive Server Launcher is free software; you can #
# redistribute it and/or modify it under the terms of the GNU Lesser General #
Expand Down Expand Up @@ -36,7 +36,7 @@ if [ "$EUID" -ne 0 ]; then
fi

### Vars
version=1.15.1
version=1.15.2
downloadUrl="https://github.com/crazy-max/csgo-server-launcher/releases/download/v$version"
scriptName="csgo-server-launcher"
scriptPath="/etc/init.d/$scriptName"
Expand Down

0 comments on commit 0e84b6f

Please sign in to comment.