PIA-ServerList/.gitea/workflows/sync-servers.yml

43 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2024-04-27 01:06:07 -04:00
name: Sync PIA Servers
on:
schedule:
2024-09-21 21:17:04 -04:00
- cron: "*/30 * * * *"
2024-04-27 01:06:07 -04:00
push:
branches: ["master"]
paths: [".gitea/workflows/sync-servers.yml", "src/**", "pom.xml"]
jobs:
docker:
strategy:
matrix:
java-version: ["17"]
maven-version: ["3.8.5"]
runs-on: "ubuntu-latest"
# 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.17.0
2024-04-27 01:06:07 -04:00
with:
java-version: ${{ matrix.java-version }}
distribution: "zulu"
maven-version: ${{ matrix.maven-version }}
# Build the app and run it
- name: Build and Run
run: mvn clean package -q -T4C && java -jar target/PIA-ServerList.jar
- name: Commit Changes
run: |
2024-04-28 18:00:53 -04:00
git config --global user.email "rainnny-ci@rainnny.club"
git config --global user.name "Rainnny-CI"
2024-04-27 18:48:43 -04:00
git add servers.json
2024-04-27 01:06:07 -04:00
git add README.md
git commit -m "Scheduled update"
2024-04-29 02:08:18 -04:00
git push https://Rainnny-CI:${{ secrets.AUTH_TOKEN }}@git.rainnny.club/Rainnny/PIA-ServerList