Add sync workflow
This commit is contained in:
parent
1569b2dc20
commit
4f9194e5fe
43
.gitea/workflows/sync-servers.yml
Normal file
43
.gitea/workflows/sync-servers.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: Sync PIA Servers
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "@hourly"
|
||||||
|
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.12.0
|
||||||
|
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: |
|
||||||
|
git config --global user.email "braydonrainnny@gmail.com"
|
||||||
|
git config --global user.name "Braydon"
|
||||||
|
git add context.json
|
||||||
|
git add README.md
|
||||||
|
git commit -m "Scheduled update"
|
||||||
|
git push https://Rainnny:${{ secrets.AUTH_TOKEN }}@git.rainnny.club/Rainnny/PIA-ServerList
|
Loading…
x
Reference in New Issue
Block a user