Skip to content

Commit

Permalink
CSGO
Browse files Browse the repository at this point in the history
  • Loading branch information
budziam committed Oct 1, 2022
1 parent 21792e6 commit 377de6c
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/csgo-master-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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: 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 }}
48 changes: 48 additions & 0 deletions .github/workflows/csgo-pr-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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.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: 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: 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 }}
build-args: |
BUILD_URL=${{ matrix.build_url }}
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

0 comments on commit 377de6c

Please sign in to comment.