fix: improve CI workflows and README documentation

This commit is contained in:
zwitschi committed 2026-08-04 16:58:05 +02:00
1 parent 8f1e227d50
commit 693b4a42f6
3 files changed
+126 -20

No files matched your search

+34 -17
View File
@@ -13,7 +13,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CI_REGISTRY_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
@@ -39,20 +38,38 @@ jobs:
cd backend/playout && go get -u ./... && go mod tidy
cd ../chat && go get -u ./... && go mod tidy
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.CI_REGISTRY_TOKEN }}
commit-message: "chore: update dependencies"
title: "chore: weekly dependency updates"
body: |
Automated weekly dependency updates.
- name: Commit and push changes
run: |
git config user.name "linearvoid-bot"
git config user.email "bot@linearvoid.local"
git add frontend/package*.json backend/playout/go.* backend/chat/go.*
if git diff --cached --quiet; then
echo "No dependency changes detected."
exit 0
fi
git commit -m "chore: update dependencies"
git push origin HEAD:dependency-updates --force
This PR updates:
- Frontend npm dependencies
- Go module dependencies
Please review the changes and ensure tests pass before merging.
branch: dependency-updates
delete-branch: true
labels: dependencies, automated
- name: Create Pull Request via Gitea API
run: |
RESPONSE=$(curl -s -o /tmp/pr-response.json -w "%{http_code}" \
-X POST "$CI_SERVER_URL/api/v1/repos/zwitschi/linearvoid/pulls" \
-H "Authorization: token ${{ secrets.CI_REGISTRY_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{
"title": "chore: weekly dependency updates",
"head": "dependency-updates",
"base": "main",
"body": "Automated weekly dependency updates.\n\nThis PR updates:\n- Frontend npm dependencies\n- Go module dependencies\n\nPlease review the changes and ensure tests pass before merging."
}')
if [ "$RESPONSE" -eq 201 ]; then
PR_URL=$(cat /tmp/pr-response.json | jq -r '.html_url')
echo "PR created: $PR_URL"
elif [ "$RESPONSE" -eq 409 ]; then
echo "PR already exists. Pushing updated commits..."
git push origin dependency-updates --force
else
echo "Error creating PR (HTTP $RESPONSE):"
cat /tmp/pr-response.json
exit 1
fi
+9 -3
View File
@@ -34,10 +34,16 @@ jobs:
id: version
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
VERSION="${{ github.event.inputs.version }}"
else
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
VERSION="${GITHUB_REF#refs/tags/}"
fi
if [[ -z "$VERSION" ]]; then
echo "::error::VERSION is empty. Provide a version via workflow_dispatch input or push a tag."
exit 1
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Releasing version: $VERSION"
- name: Extract metadata for Playout
id: meta-playout
@@ -96,7 +102,7 @@ jobs:
- name: Create Release on Gitea
run: |
curl -X POST "$CI_SERVER_URL/api/v1/repos/$CI_REPO_OWNER/$CI_REPO_NAME/releases" \
curl -X POST "https://git.allucanget.biz/api/v1/repos/zwitschi/linearvoid/releases" \
-H "Authorization: token ${{ secrets.CI_REGISTRY_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${{ steps.version.outputs.version }}\",\"name\":\"${{ steps.version.outputs.version }}\",\"body\":\"Release ${{ steps.version.outputs.version }}\n\nSee [CHANGELOG.md](https://git.allucanget.biz/zwitschi/linearvoid/src/branch/main/CHANGELOG.md) for details.\",\"draft\":false,\"prerelease\":false}"