untested, might work, might not

This commit is contained in:
Lee
2024-04-29 06:39:32 +01:00
parent 33353845df
commit 9eaca049b7
7 changed files with 130 additions and 72 deletions

30
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,30 @@
name: Deploy to Dokku
on:
push:
branches: ["master"]
paths-ignore:
- .gitignore
- README.md
- LICENSE
- servers.json
jobs:
docker:
strategy:
matrix:
arch: ["ubuntu-latest"]
runs-on: ${{ matrix.arch }}
# Steps to run
steps:
# Checkout the repo
- name: Checkout
uses: actions/checkout@v4
# Deploy to Dokku
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: "ssh://dokku@10.0.50.65:22/pia-servers"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

View File

@ -1,53 +0,0 @@
name: Fetch new Pia Servers
on:
schedule:
# - cron: "@hourly"
- cron: "*/30 * * * *"
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+pia-servers-ci@fascinated.cc"
git config --global user.name "PIA Servers CI"
git add servers.json
git add README.md
git commit -m "Scheduled update"
git push https://pia-servers-ci:${{ secrets.AUTH_TOKEN }}@git.fascinated.cc/Fascinated/PIA-Servers