Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/csgo-master-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CSGO Master Workflow
on:
push:
branches:
- master
paths:
- csgo/**
jobs:
main:
name: Build and push docker image to Docker Hub
runs-on: ubuntu-latest
strategy:
matrix:
include:
- version: "1.10.0"
build_url: "https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6482-linux.tar.gz"
- version: "1.11.0"
build_url: "https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6911-linux.tar.gz"
- version: "1.12.0"
build_url: "https://sm.alliedmods.net/smdrop/1.12/sourcemod-1.12.0-git6925-linux.tar.gz"
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Cache csgo
id: cache-csgo
uses: actions/cache@v3
with:
path: /tmp/csgo
key: csgo
restore-keys: |
csgo

- name: Build and push to Docker Hub
uses: docker/build-push-action@v2
with:
context: ./csgo
push: true
tags: budziam/csgo:${{ matrix.version }}
build-args: |
BUILD_URL=${{ matrix.build_url }}
61 changes: 61 additions & 0 deletions .github/workflows/csgo-pr-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CS:GO Pull Request Workflow
on:
pull_request:
branches:
- master
paths:
- csgo/**
jobs:
main:
name: Build docker image
runs-on: ubuntu-latest
strategy:
matrix:
include:
- version: "1.10"
# - version: "1.11"
# - version: "1.12"
steps:
- name: Clean up space
shell: bash
run: |
echo "=== Before ==="
df -h /
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
echo "=== After ==="
df -h /

- name: Check out the repo
uses: actions/checkout@v2

- name: Get commit SHA
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Cache csgo
id: cache-csgo
uses: actions/cache@v3
with:
path: /tmp/csgo
key: csgo

- name: Build and push to Docker Hub
uses: docker/build-push-action@v2
with:
context: ./csgo
push: true
tags: budziam/csgo:${{ matrix.version }}-${{ steps.vars.outputs.sha_short }}
Empty file removed csgo/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions csgo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM steamcmd/steamcmd:ubuntu-20

RUN mkdir /tmp/csgo
RUN steamcmd +force_install_dir /tmp/csgo +login anonymous +app_update 740 validate +quit