PIA-Servers/.gitea/workflows/fetch-new.yml
Liam 0b867fef0d
All checks were successful
Fetch new Pia Servers / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 14s
i am soooooo smart
2024-04-27 05:53:32 +01:00

53 lines
1.3 KiB
YAML

name: Fetch new Pia Servers
on:
schedule:
- cron: "@hourly"
push:
branches: ["master"]
paths-ignore:
- .gitignore
- README.md
- LICENSE
- servers.json
jobs:
docker:
strategy:
matrix:
arch: ["ubuntu-latest"]
git-version: ["2.44.0"]
java-version: ["17"]
maven-version: ["3.8.5"]
runs-on: ${{ matrix.arch }}
# Steps to run
steps:
# Checkout the repo
- name: Checkout
uses: actions/checkout@v4
# Setup Java and Maven
- name: Set up JDK and Maven
uses: s4u/setup-maven-action@v1.12.0
with:
java-version: ${{ matrix.java-version }}
distribution: "zulu"
maven-version: ${{ matrix.maven-version }}
- name: Build PIA Servers
run: mvn clean package -T 2C -q
- name: Fetch new PIA servers
run: java -jar target/PIA-Servers.jar
- name: Commit and push changes
run: |
git config --global user.email "liam@fascinated.cc"
git config --global user.name "Liam"
git add servers.json
git add README.md
git commit -m "Scheduled update"
git push https://fascinated:${{ secrets.AUTH_TOKEN }}@git.fascinated.cc/Fascinated/PIA-Servers