mirror of
https://github.com/Dasemu/Maskarr.git
synced 2026-11-26 15:26:10 +00:00
Compare commits
3
Commits
main
..
development
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
794ca51f29 | ||
|
|
0629ef5de3 | ||
|
|
32aaf00b84 |
No files matched your search
@@ -65,22 +65,6 @@ jobs:
|
|||||||
git pull --rebase origin ${{ gitea.ref_name }}
|
git pull --rebase origin ${{ gitea.ref_name }}
|
||||||
git push origin HEAD:${{ gitea.ref_name }}
|
git push origin HEAD:${{ gitea.ref_name }}
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
if: gitea.ref_name == 'main'
|
|
||||||
env:
|
|
||||||
TOKEN: ${{ gitea.token }}
|
|
||||||
TAG: v${{ steps.version.outputs.new }}
|
|
||||||
API: ${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}
|
|
||||||
run: |
|
|
||||||
status=$(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: token $TOKEN" "$API/releases/tags/$TAG")
|
|
||||||
if [ "$status" = "200" ]; then
|
|
||||||
echo "Release $TAG already exists, skipping"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
curl -sf -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
|
|
||||||
-d "{\"tag_name\": \"$TAG\", \"target_commitish\": \"$(git rev-parse HEAD)\", \"name\": \"$TAG\", \"body\": \"Release $TAG\"}" \
|
|
||||||
"$API/releases"
|
|
||||||
|
|
||||||
- name: Merge main back into development
|
- name: Merge main back into development
|
||||||
if: gitea.ref_name == 'main'
|
if: gitea.ref_name == 'main'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -22,40 +22,3 @@ jobs:
|
|||||||
# No linter or test suite is configured for this project yet.
|
# No linter or test suite is configured for this project yet.
|
||||||
# This is a lightweight sanity check (syntax/import compile), not a test run.
|
# This is a lightweight sanity check (syntax/import compile), not a test run.
|
||||||
- run: python3 -m py_compile maskarr.py
|
- run: python3 -m py_compile maskarr.py
|
||||||
|
|
||||||
release:
|
|
||||||
needs: check
|
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
# The version bump lands as a later "chore(release)" commit on main, so
|
|
||||||
# wait for it and release that commit instead of the pre-bump one.
|
|
||||||
- name: Resolve release commit
|
|
||||||
id: rel
|
|
||||||
run: |
|
|
||||||
sha="${{ github.sha }}"
|
|
||||||
for i in $(seq 1 30); do
|
|
||||||
git fetch -q origin main
|
|
||||||
bump=$(git log --reverse --format='%H %s' "$sha..origin/main" | grep -m1 ' chore(release): v' | cut -d' ' -f1 || true)
|
|
||||||
if [ -n "$bump" ]; then sha="$bump"; break; fi
|
|
||||||
sleep 20
|
|
||||||
done
|
|
||||||
echo "sha=$sha" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "version=$(git show "$sha:VERSION")" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
run: |
|
|
||||||
tag="v${{ steps.rel.outputs.version }}"
|
|
||||||
if gh release view "$tag" >/dev/null 2>&1; then
|
|
||||||
echo "Release $tag already exists, skipping"
|
|
||||||
else
|
|
||||||
gh release create "$tag" --target "${{ steps.rel.outputs.sha }}" --title "$tag" --generate-notes
|
|
||||||
fi
|
|
||||||
@@ -22,7 +22,7 @@ Everything lives in `maskarr.py`: an `http.server`-based proxy that forwards req
|
|||||||
- No `development` branch exists yet; CI and the version workflow reference it per the standard shape, but they won't trigger until it's created.
|
- No `development` branch exists yet; CI and the version workflow reference it per the standard shape, but they won't trigger until it's created.
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
Docker image published to GHCR only, on push to `main`/tags (`.github/workflows/docker-publish.yml`). Version workflow lives in `.gitea/workflows/`; CI runs in both `.gitea/workflows/` and `.github/workflows/`. On pushes to `main`, a `vX.Y.Z` release is created on Gitea (last step of `version.yml`, after the bump) and on GitHub (`release` job in `.github/workflows/ci.yml`, which waits for the bump commit). See `docs/deployment.md` for systemd and Docker instructions.
|
Docker image published to GHCR only, on push to `main`/tags (`.github/workflows/docker-publish.yml`). Version workflow lives in `.gitea/workflows/`; CI runs in both `.gitea/workflows/` and `.github/workflows/`. See `docs/deployment.md` for systemd and Docker instructions.
|
||||||
|
|
||||||
## Gotchas
|
## Gotchas
|
||||||
- `maskarr_config.json` is tracked as an empty template; don't commit it populated with real tracker credentials/cookies.
|
- `maskarr_config.json` is tracked as an empty template; don't commit it populated with real tracker credentials/cookies.
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ docker run -d \
|
|||||||
The GitHub Actions workflow `.github/workflows/docker-publish.yml` publishes the Docker image to
|
The GitHub Actions workflow `.github/workflows/docker-publish.yml` publishes the Docker image to
|
||||||
**GitHub Container Registry** (`ghcr.io`) on each push to `main`/`master` or tag `v*.*.*`.
|
**GitHub Container Registry** (`ghcr.io`) on each push to `main`/`master` or tag `v*.*.*`.
|
||||||
CI and versioning run on Gitea Actions (`.gitea/workflows/` (CI also runs on GitHub)).
|
CI and versioning run on Gitea Actions (`.gitea/workflows/` (CI also runs on GitHub)).
|
||||||
Every push to `main` creates a `vX.Y.Z` tag and release on both Gitea (`version.yml`, after the version bump) and GitHub (`release` job in `ci.yml`).
|
|
||||||
|
|
||||||
### Using published images
|
### Using published images
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user