Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f774ac4e8
|
||
|
|
d85826757b | ||
|
|
6937d3142e
|
||
|
|
bd3f05d09e
|
||
|
|
9e3a568b22
|
||
|
|
6ec1eda53d | ||
|
|
1add336e12
|
||
|
|
45d571c487
|
||
|
|
4972318aff
|
@@ -9,7 +9,7 @@ jobs:
|
|||||||
renovate:
|
renovate:
|
||||||
name: Dependency-Updates prüfen & Pull Requests erstellen
|
name: Dependency-Updates prüfen & Pull Requests erstellen
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/renovatebot/renovate:44.82.0
|
container: ghcr.io/renovatebot/renovate:44.83.0
|
||||||
steps:
|
steps:
|
||||||
- name: Renovate ausführen
|
- name: Renovate ausführen
|
||||||
run: renovate
|
run: renovate
|
||||||
|
|||||||
@@ -0,0 +1,111 @@
|
|||||||
|
name: Auto-PR (Testing → Main)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- testing
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create-pr:
|
||||||
|
name: Erstelle automatisch PR von testing nach main
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Prüfe auf bereits offenen PR nach main
|
||||||
|
id: check_pr
|
||||||
|
env:
|
||||||
|
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||||
|
REPO: ${{ gitea.repository || github.repository }}
|
||||||
|
TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||||
|
run: |
|
||||||
|
OPEN_PRS=$(curl -s -H "Authorization: token ${TOKEN}" "${GITEA_URL}/api/v1/repos/${REPO}/pulls?state=open&limit=50")
|
||||||
|
EXISTS=$(echo "$OPEN_PRS" | jq -r '[.[] | select(.base.ref == "main" and .head.ref == "testing")] | length')
|
||||||
|
echo "Bereits offene testing→main PRs: ${EXISTS}"
|
||||||
|
echo "exists=${EXISTS}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Ermittle Versionen auf main & testing
|
||||||
|
id: versions
|
||||||
|
if: steps.check_pr.outputs.exists == '0'
|
||||||
|
run: |
|
||||||
|
git fetch origin main
|
||||||
|
MAIN_VERSION="$(git show origin/main:Cargo.toml | sed -n 's/^version = "\(.*\)"/\1/p' | head -n1)"
|
||||||
|
TESTING_VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
||||||
|
echo "Version auf main: ${MAIN_VERSION} / Version auf testing: ${TESTING_VERSION}"
|
||||||
|
echo "main_version=${MAIN_VERSION}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "testing_version=${TESTING_VERSION}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Ermittle geänderte Kategorien (main...testing)
|
||||||
|
id: categories
|
||||||
|
if: steps.check_pr.outputs.exists == '0' && steps.versions.outputs.main_version == steps.versions.outputs.testing_version
|
||||||
|
run: |
|
||||||
|
CHANGED_FILES="$(git diff --name-only origin/main...HEAD)"
|
||||||
|
echo "Geänderte Dateien main...testing:"
|
||||||
|
echo "$CHANGED_FILES"
|
||||||
|
|
||||||
|
WORKFLOWS="false"
|
||||||
|
CONFIG="false"
|
||||||
|
DOCS="false"
|
||||||
|
|
||||||
|
if echo "$CHANGED_FILES" | grep -q '^\.gitea/workflows/'; then
|
||||||
|
WORKFLOWS="true"
|
||||||
|
fi
|
||||||
|
if echo "$CHANGED_FILES" | grep -qE '^(renovate\.json|qodana\.yaml|Cargo\.toml|Cargo\.lock|\.cargo/)'; then
|
||||||
|
CONFIG="true"
|
||||||
|
fi
|
||||||
|
if echo "$CHANGED_FILES" | grep -qE '(^|/)[^/]+\.md$|^LICENSE$'; then
|
||||||
|
DOCS="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "workflows=${WORKFLOWS}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "config=${CONFIG}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "docs=${DOCS}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Bestimme PR-Titel
|
||||||
|
id: title
|
||||||
|
if: steps.check_pr.outputs.exists == '0'
|
||||||
|
run: |
|
||||||
|
if [ "${{ steps.versions.outputs.main_version }}" != "${{ steps.versions.outputs.testing_version }}" ]; then
|
||||||
|
TITLE="Merge testing in main: Release ${{ steps.versions.outputs.testing_version }}"
|
||||||
|
else
|
||||||
|
PARTS=()
|
||||||
|
[ "${{ steps.categories.outputs.workflows }}" = "true" ] && PARTS+=("Workflows")
|
||||||
|
[ "${{ steps.categories.outputs.config }}" = "true" ] && PARTS+=("Konfigurationen")
|
||||||
|
[ "${{ steps.categories.outputs.docs }}" = "true" ] && PARTS+=("Dokumentation")
|
||||||
|
|
||||||
|
if [ ${#PARTS[@]} -eq 0 ]; then
|
||||||
|
TITLE="Merge testing in main"
|
||||||
|
else
|
||||||
|
JOINED=""
|
||||||
|
for PART in "${PARTS[@]}"; do
|
||||||
|
if [ -z "$JOINED" ]; then
|
||||||
|
JOINED="$PART"
|
||||||
|
else
|
||||||
|
JOINED="${JOINED} & ${PART}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
TITLE="Merge testing in main: ${JOINED} aktualisiert"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Ermittelter PR-Titel: ${TITLE}"
|
||||||
|
echo "title=${TITLE}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Erstelle PR (testing -> main)
|
||||||
|
if: steps.check_pr.outputs.exists == '0'
|
||||||
|
env:
|
||||||
|
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||||
|
REPO: ${{ gitea.repository || github.repository }}
|
||||||
|
TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||||
|
TITLE: ${{ steps.title.outputs.title }}
|
||||||
|
run: |
|
||||||
|
PAYLOAD=$(jq -n --arg title "$TITLE" --arg head "testing" --arg base "main" \
|
||||||
|
'{title: $title, head: $head, base: $base}')
|
||||||
|
curl -f -s -S -X POST \
|
||||||
|
-H "Authorization: token ${TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$PAYLOAD" \
|
||||||
|
"${GITEA_URL}/api/v1/repos/${REPO}/pulls"
|
||||||
|
echo "PR erstellt: ${TITLE}"
|
||||||
Generated
+1
-1
@@ -10,7 +10,7 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "config-ctdra"
|
name = "config-ctdra"
|
||||||
version = "1.0.5"
|
version = "1.0.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"confy",
|
"confy",
|
||||||
"program-ctdra",
|
"program-ctdra",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "config-ctdra"
|
name = "config-ctdra"
|
||||||
version = "1.0.5"
|
version = "1.0.6"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ['DragonSlayer_14']
|
authors = ['DragonSlayer_14']
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
Reference in New Issue
Block a user