All checks were successful
Find and Upload Minecraft Server versions / build (push) Successful in 54s
42 lines
896 B
YAML
42 lines
896 B
YAML
name: Find and Upload Minecraft Server versions
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 */6 * * *"
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
name: Checkout code
|
|
with:
|
|
ref: main
|
|
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "^1.22.1"
|
|
cache: true
|
|
|
|
- name: Find and Upload
|
|
run: go run ./main.go
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
- name: Upload to artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Versions
|
|
path: ./versions.json
|
|
|
|
- run: |
|
|
if ! git diff-index --quiet HEAD --; then
|
|
git config user.name "Minecraft Server Maneger"
|
|
git config user.email "bds@sirherobrine23.org"
|
|
git add .
|
|
git commit -m "Add new version"
|
|
git push
|
|
fi |