mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2026-06-06 22:57:10 +00:00
codeberg migration
This commit is contained in:
24
.forgejo/workflows/build.yml
Executable file
24
.forgejo/workflows/build.yml
Executable file
@@ -0,0 +1,24 @@
|
||||
name: Build with Gradle
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 25
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 25
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
31
.forgejo/workflows/hangar.yml
Executable file
31
.forgejo/workflows/hangar.yml
Executable file
@@ -0,0 +1,31 @@
|
||||
name: Update Hangar Description
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
jobs:
|
||||
update-hangar-page:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Authenticate with Hangar
|
||||
id: authenticate
|
||||
run: |
|
||||
RESPONSE=$(curl -s -X POST "https://hangar.papermc.io/api/v1/authenticate?apiKey=${{ secrets.HANGAR }}" -H 'accept: application/json')
|
||||
TOKEN=$(echo $RESPONSE | jq -r '.token')
|
||||
if [[ "$TOKEN" == "null" ]]; then
|
||||
echo "Error: Unable to fetch JWT token"
|
||||
exit 1
|
||||
fi
|
||||
echo "::add-mask::$TOKEN"
|
||||
echo "token=$TOKEN" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Update Project Description
|
||||
run: |
|
||||
README_CONTENT=$(cat README.md | jq -Rs .)
|
||||
curl -s -X PATCH "https://hangar.papermc.io/api/v1/pages/editmain/ToolStats" \
|
||||
-H "content-type: application/json" \
|
||||
-H "Authorization: HangarAuth ${{ steps.authenticate.outputs.token }}" \
|
||||
-d "{\"content\":$README_CONTENT}"
|
||||
13
.forgejo/workflows/modrinth.yml
Executable file
13
.forgejo/workflows/modrinth.yml
Executable file
@@ -0,0 +1,13 @@
|
||||
name: Update Modrinth Description
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
jobs:
|
||||
modrinth-desc:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: funnyboy-roks/modrinth-auto-desc@v1.6
|
||||
with:
|
||||
auth-token: ${{ secrets.MODRINTH }}
|
||||
slug: 'oBZj9E15'
|
||||
41
.forgejo/workflows/renovate.yml
Normal file
41
.forgejo/workflows/renovate.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Renovate
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '@daily'
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-fat
|
||||
container: ghcr.io/renovatebot/renovate:latest
|
||||
steps:
|
||||
- name: Checkout renovate-config repo
|
||||
run: |
|
||||
git clone https://codeberg.org/hyperdefined/renovate-config.git renovate-config
|
||||
|
||||
- name: Show workspace (debug)
|
||||
run: |
|
||||
echo "WORKSPACE: $GITHUB_WORKSPACE"
|
||||
ls -la "$GITHUB_WORKSPACE"
|
||||
ls -la "$GITHUB_WORKSPACE/renovate-config"
|
||||
test -f "$GITHUB_WORKSPACE/renovate-config/config.js" || (echo "config.js missing" && exit 1)
|
||||
|
||||
- name: Run Renovate
|
||||
run: renovate
|
||||
env:
|
||||
RENOVATE_CONFIG_FILE: renovate-config/config.js
|
||||
LOG_LEVEL: debug
|
||||
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.WOLF_BOT_KEY }}
|
||||
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||
GITHUB_COM_TOKEN: ${{ secrets.CODEBERG_PAT }}
|
||||
GIT_AUTHOR_NAME: 'wolf-bot'
|
||||
GIT_AUTHOR_EMAIL: 'wolf@hyper.lol'
|
||||
GIT_COMMITTER_NAME: 'wolf-bot'
|
||||
GIT_COMMITTER_EMAIL: 'wolf@hyper.lol'
|
||||
Reference in New Issue
Block a user