48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Gitea Version Tracker
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 8 * * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Stable Gitea version (e.g. 28.2.0); empty means latest'
|
|
required: false
|
|
|
|
jobs:
|
|
track:
|
|
name: Track Gitea Release
|
|
runs-on: linux-amd64-docker-small
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: main
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Test tracker
|
|
run: python -B -m unittest discover -s .github/scripts -p 'test_*.py'
|
|
|
|
- name: Record pending Gitea release
|
|
id: version
|
|
run: python -B .github/scripts/track_gitea_release.py
|
|
env:
|
|
GITEA_VERSION: ${{ github.event.inputs.version }}
|
|
# Optional GitHub token for upstream API rate limits; never use the Gitea job token.
|
|
GITHUB_TOKEN: ${{ secrets.UPSTREAM_GITHUB_TOKEN }}
|
|
|
|
- name: Create Pull Request
|
|
if: steps.version.outputs.changed == 'true'
|
|
run: python -B .github/scripts/gitea_actions.py create-pull-request --version "$UPSTREAM_VERSION"
|
|
env:
|
|
UPSTREAM_VERSION: ${{ steps.version.outputs.version }}
|
|
GITEA_SERVER_URL: ${{ github.server_url }}
|
|
GITEA_REPOSITORY: ${{ github.repository }}
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|