Browse Source

chore(actions): tidy workflows and script layout

pull/4917/head
Daniel Gibbs 1 month ago
parent
commit
05f46e18d5
Failed to extract signature
  1. 0
      .github/scripts/details-check-generate-matrix.sh
  2. 0
      .github/scripts/serverlist-validate-game-icons.sh
  3. 16
      .github/scripts/serverlist-validate.sh
  4. 0
      .github/scripts/version-check.sh
  5. 29
      .github/workflows/action-update-copyright-years-in-license-file.yml
  6. 2
      .github/workflows/details-check.yml
  7. 4
      .github/workflows/serverlist-validate.yml
  8. 2
      .github/workflows/version-check.yml

0
.github/workflows/details-check-generate-matrix.sh → .github/scripts/details-check-generate-matrix.sh

0
.github/workflows/serverlist-validate-game-icons.sh → .github/scripts/serverlist-validate-game-icons.sh

16
.github/workflows/serverlist-validate.sh → .github/scripts/serverlist-validate.sh

@ -22,20 +22,4 @@ for csv in "${csvlist[@]}"; do
fi
done
# Compare all game servers listed in serverlist.csv to $shortname-icon.png files in ${datadir}/gameicons
# if the game server is listed in serverlist.csv then it will have a $shortname-icon.png file
# loop though shortname in serverlist.csv
echo ""
echo "Checking that all the game servers listed in serverlist.csv have a shortname-icon.png file"
for shortname in $(tail -n +2 serverlist.csv | cut -d ',' -f1); do
# check if $shortname-icon.png exists
if [ ! -f "gameicons/${shortname}-icon.png" ]; then
echo "ERROR: gameicons/${shortname}-icon.png does not exist"
exitcode=1
else
echo "OK: gameicons/${shortname}-icon.png exists"
fi
done
exit "${exitcode}"

0
.github/workflows/version-check.sh → .github/scripts/version-check.sh

29
.github/workflows/action-update-copyright-years-in-license-file.yml

@ -1,29 +0,0 @@
name: Update copyright year(s) in license file
on:
workflow_dispatch:
schedule:
- cron: "0 3 1 1 *" # 03:00 AM on January 1
permissions:
contents: write
jobs:
update-license-year:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Action Update License Year
uses: FantasticFiasco/action-update-license-year@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: LICENSE.md
- name: Merge pull request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge --merge --delete-branch

2
.github/workflows/details-check.yml

@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
- name: Generate matrix with generate-matrix.sh
run: chmod +x .github/workflows/details-check-generate-matrix.sh; .github/workflows/details-check-generate-matrix.sh
run: .github/scripts/details-check-generate-matrix.sh
- name: Set Matrix
id: set-matrix

4
.github/workflows/serverlist-validate.yml

@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4
- name: Compare Versions
run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh
run: .github/scripts/serverlist-validate.sh
- name: Validate Game Icons
run: chmod +x .github/workflows/serverlist-validate-game-icons.sh; .github/workflows/serverlist-validate-game-icons.sh
run: .github/scripts/serverlist-validate-game-icons.sh

2
.github/workflows/version-check.yml

@ -14,4 +14,4 @@ jobs:
uses: actions/checkout@v4
- name: Version Check
run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh
run: .github/scripts/version-check.sh

Loading…
Cancel
Save