mirror of
https://github.com/Dasemu/Maskarr.git
synced 2026-11-26 15:26:10 +00:00
chore: publish Docker image from GitHub only; move ci and version workflows to .gitea
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ed8ab0a0c
commit
6dab117041
5 files changed
+4
-98
No files matched your search
@@ -1,24 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [development]
|
||||
push:
|
||||
branches: [development, main]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: "pip"
|
||||
|
||||
- run: pip install -r requirements.txt
|
||||
|
||||
# No linter or test suite is configured for this project yet.
|
||||
# This is a lightweight sanity check (syntax/import compile), not a test run.
|
||||
- run: python3 -m py_compile maskarr.py
|
||||
@@ -1,68 +0,0 @@
|
||||
name: Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [development, main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
bump:
|
||||
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && github.actor != 'github-actions[bot]' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Configure git identity
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Determine bump type
|
||||
id: bump
|
||||
run: |
|
||||
if [ "${{ github.ref_name }}" = "development" ]; then
|
||||
echo "type=patch" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
# main: minor bump only when this push is a merge (an approved
|
||||
# development -> main PR), otherwise a direct hotfix push.
|
||||
MERGE_COMMIT=$(git log -1 --merges --pretty=%H || true)
|
||||
if [ -n "$MERGE_COMMIT" ]; then
|
||||
echo "type=minor" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "type=patch" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Bump VERSION
|
||||
id: version
|
||||
run: |
|
||||
current=$(cat VERSION)
|
||||
IFS='.' read -r major minor patch <<< "$current"
|
||||
if [ "${{ steps.bump.outputs.type }}" = "minor" ]; then
|
||||
minor=$((minor + 1))
|
||||
patch=0
|
||||
else
|
||||
patch=$((patch + 1))
|
||||
fi
|
||||
new="$major.$minor.$patch"
|
||||
echo "$new" > VERSION
|
||||
echo "new=$new" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Commit and push version bump
|
||||
run: |
|
||||
git add VERSION
|
||||
git commit -m "chore(release): v${{ steps.version.outputs.new }} [skip ci]"
|
||||
git push origin HEAD:${{ github.ref_name }}
|
||||
|
||||
- name: Merge main back into development
|
||||
if: github.ref_name == 'main'
|
||||
run: |
|
||||
git fetch origin development
|
||||
git checkout development
|
||||
git merge --no-edit origin/main
|
||||
git push origin development
|
||||
Reference in new issue
Block a user