Skip to content

Commit

Permalink
Merge branch 'develop' into feature/4043-httpport
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Oct 7, 2023
2 parents a1cbbdc + e0b7739 commit 9c4f801
Show file tree
Hide file tree
Showing 513 changed files with 26,016 additions and 3,112 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ body:
- Ubuntu 20.04
- Ubuntu 18.04
- Ubuntu 16.04
- Debian 12
- Debian 11
- Debian 10
- Debian 9
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ body:
- Ubuntu 20.04
- Ubuntu 18.04
- Ubuntu 16.04
- Debian 12
- Debian 11
- Debian 10
- Debian 9
Expand Down
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
- "/(Avorion)/i"
"game: Ballistic Overkill":
- "/(Ballistic Overkill)/i"
"game: Battalion 1944":
- "/(Battalion 1944)/i"
"game: BATTALION: Legacy":
- "/(BATTALION: Legacy)/i"
"game: Barotrauma":
- "/(Barotrauma)/i"
"game: Counter-Strike: Global Offensive":
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Add to Project
on:
issues:
types:
- opened
- labeled

jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- name: Add to Project
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/GameServerManagers/projects/11
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: "type: game server request"
85 changes: 85 additions & 0 deletions .github/workflows/details-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# This action will check that LinuxGSM is picking up game server config and parameter variables.
name: Details Check
on:
workflow_dispatch:
push:

concurrency:
group: details-check-${{ github.ref_name }}
cancel-in-progress: true

jobs:
create-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Generate matrix with generate-matrix.sh
run: chmod +x .github/workflows/detals-check-generate-matrix.sh; .github/workflows/detals-check-generate-matrix.sh

- name: Set Matrix
id: set-matrix
run: |
shortnamearray=$(cat shortnamearray.json)
echo "${shortnamearray}"
echo -n "matrix=${shortnamearray}" >> $GITHUB_OUTPUT
details-check:
needs: create-matrix
continue-on-error: true
runs-on: ubuntu-latest

strategy:
matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }}

steps:
- name: Download linuxgsm.sh
run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh; chmod +x linuxgsm.sh

- name: Install dependencies
run: sudo apt-get install libxml2-utils jq

- name: Create serverfiles directory
run: mkdir -p serverfiles

- name: Grab server
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server

- name: Enable developer mode
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer

- name: Generate servercfgname
id: sets-servercfgname
run: |
servercfg=$(sed -n "/^\<servercfgdefault\>/ { s/.*= *\"\?\([^\"']*\)\"\?/\1/p;q }" lgsm/config-lgsm/${{ matrix.shortname }}server/_default.cfg)
echo "servercfgname=$servercfg" >> "$GITHUB_OUTPUT"
- name: Download config
run: |
if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then
echo "This game server has no config file."
else
curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}"
fi
- name: Display config
run: |
if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then
echo "This game server has no config file."
else
cat config
fi
- name: Display parameters
run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg

- name: Details
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server details

- name: Detect details
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server detect-details

- name: Query Raw
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server query-raw
25 changes: 25 additions & 0 deletions .github/workflows/detals-check-generate-matrix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv

echo -n "{" > "shortnamearray.json"
echo -n "\"include\":[" >> "shortnamearray.json"

while read -r line; do
shortname=$(echo "$line" | awk -F, '{ print $1 }')
export shortname
servername=$(echo "$line" | awk -F, '{ print $2 }')
export servername
gamename=$(echo "$line" | awk -F, '{ print $3 }')
export gamename
distro=$(echo "$line" | awk -F, '{ print $4 }')
export distro
echo -n "{" >> "shortnamearray.json"
echo -n "\"shortname\":" >> "shortnamearray.json"
echo -n "\"${shortname}\"" >> "shortnamearray.json"
echo -n "}," >> "shortnamearray.json"
done < <(tail -n +2 serverlist.csv)
sed -i '$ s/.$//' "shortnamearray.json"
echo -n "]" >> "shortnamearray.json"
echo -n "}" >> "shortnamearray.json"
rm serverlist.csv
11 changes: 6 additions & 5 deletions .github/workflows/git-sync.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
name: Github to Bitbucket sync
name: Github to Bitbucket Sync
# This action will sync the github repo with a backup bitbucket repo.
# This will allow LinuxGSM to use Bitbucket as and alternative download if github fails.
on:
push:
branches:
- master
- develop

jobs:
GitHub-to-Bitbucket:
gitHub-to-bitbucket:
runs-on: ubuntu-latest
steps:
- name: webfactory/[email protected]
uses: webfactory/ssh-agent@v0.7.0
- name: SSH Agent
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.BITBUCKET_SECRET }}

- name: wei/[email protected]
- name: Git Sync
uses: wei/[email protected]
with:
ssh_private_key: ${{ secrets.BITBUCKET_SECRET }}
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/label-sponsors.yml

This file was deleted.

26 changes: 16 additions & 10 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: "Issue Labeler"
name: Issue Labeler
on:
issues:
types: [opened, edited]
pull_request:
types: [opened, edited]
types:
- opened
- edited

permissions:
issues: write
contents: read

jobs:
triage:
permissions:
contents: read # for github/issue-labeler to get repo contents
issues: write # for github/issue-labeler to create or remove labels
issue-labeler:
runs-on: ubuntu-latest
steps:
- uses: github/[email protected]
- name: Issue Labeler
uses: github/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
not-before:
enable-versioned-regex: 0
include-title: 1

is-sponsor-label:
runs-on: ubuntu-latest
steps:
- name: Is Sponsor Label
uses: JasonEtco/is-sponsor-label-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 6 additions & 8 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: "Lock Threads"

name: Lock Threads
on:
schedule:
- cron: "0 0 * * *"
- cron: "0 0 * * 1"

permissions:
contents: read
issues: write
pull-requests: write

jobs:
lock:
permissions:
issues: write # for dessant/lock-threads to lock issues
pull-requests: write # for dessant/lock-threads to lock PRs
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4
- name: Lock Threads
uses: dessant/lock-threads@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-comment: >
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/potential-duplicates.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
name: Potential Duplicates
on:
issues:
types: [opened]
types:
- opened
jobs:
run:
potential-duplicates:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/potential-duplicates@v1
- name: Potential Duplicates
uses: wow-actions/potential-duplicates@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Issue title filter work with anymatch https://www.npmjs.com/package/anymatch.
# Any matched issue will stop detection immediately.
# You can specify multi filters in each line.
filter: ""
# Exclude keywords in title before detecting.
exclude: ""
# Label to set, when potential duplicates are detected.
label: potential-duplicate
# Get issues with state to compare. Supported state: 'all', 'closed', 'open'.
state: all
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
threshold: 0.8
# Reactions to be add to comment when potential duplicates are detected.
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
#reactions: 'eyes, confused'
# Comment to post when potential duplicates are detected.
comment: >
Potential duplicates: {{#issues}}
- [#{{ number }}] {{ title }} ({{ accuracy }}%)
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/serverlist-validate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
echo "Checking that all the game servers are listed in all csv files"
echo "this check will ensure serverlist.csv has the same number of lines (-2 lines) as the other csv files"
# count the number of lines in the serverlist.csv
cd "lgsm/data" || exit
serverlistcount="$(tail -n +2 serverlist.csv | wc -l)"
echo "serverlistcount: $serverlistcount"
# get list of all csv files starting with ubunutu debian centos
csvlist="$(ls -1 | grep -E '^(ubuntu|debian|centos|rhel|almalinux|rocky).*\.csv$')"
# loop though each csv file and make sure the number of lines is the same as the serverlistcount
for csv in $csvlist; do
csvcount="$(wc -l < "${csv}")"
csvcount=$((csvcount-2))
if [ "$csvcount" -ne "$serverlistcount" ]; then
echo "ERROR: $csv ($csvcount) does not match serverlist.csv ($serverlistcount)"
exitcode=1
else
echo "OK: $csv ($csvcount) and serverlist.csv ($serverlistcount) match"
fi
done

exit ${exitcode}
14 changes: 14 additions & 0 deletions .github/workflows/serverlist-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Server List Validation
on:
workflow_dispatch:
push:

jobs:
serverlist-validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Compare Versions
run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh
12 changes: 8 additions & 4 deletions .github/workflows/trigger-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ on:
release:
types:
- published

jobs:
trigger_build_docker-linuxgsm:
name: Trigger Build docker-linuxgsm
name: Trigger Build Docker LinuxGSM
runs-on: ubuntu-latest
steps:
- uses: convictional/[email protected]
- name: Trigger Workflow and Wait (linuxgsm)
uses: convictional/[email protected]
with:
owner: GameServerManagers
repo: docker-linuxgsm
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
workflow_file_name: docker-publish.yml

trigger_build_docker-gameserver:
name: Trigger Build docker-linuxgsm
name: Trigger Build Docker GameServer
needs: trigger_build_docker-linuxgsm
runs-on: ubuntu-latest
steps:
- uses: convictional/[email protected]
- name: Trigger Workflow and Wait (gameserver)
uses: convictional/[email protected]
with:
owner: GameServerManagers
repo: docker-gameserver
Expand Down
Loading

0 comments on commit 9c4f801

Please sign in to comment.