add some files
Some checks failed
CI - 4NK_node / Code Quality (push) Failing after 37s
CI - 4NK_node / Unit Tests (push) Failing after 36s
CI - 4NK_node / Integration Tests (push) Successful in 33s
CI - 4NK_node / Security Tests (push) Failing after 32s
CI - 4NK_node / Docker Build & Test (push) Failing after 15s
CI - 4NK_node / Documentation Tests (push) Successful in 10s
CI - 4NK_node / Security Audit (push) Successful in 8s
CI - 4NK_node / Release Guard (push) Has been skipped
CI - 4NK_node / Performance Tests (push) Successful in 34s
CI - 4NK_node / Notify (push) Failing after 2s
CI - 4NK_node / Publish Release (push) Has been skipped
Some checks failed
CI - 4NK_node / Code Quality (push) Failing after 37s
CI - 4NK_node / Unit Tests (push) Failing after 36s
CI - 4NK_node / Integration Tests (push) Successful in 33s
CI - 4NK_node / Security Tests (push) Failing after 32s
CI - 4NK_node / Docker Build & Test (push) Failing after 15s
CI - 4NK_node / Documentation Tests (push) Successful in 10s
CI - 4NK_node / Security Audit (push) Successful in 8s
CI - 4NK_node / Release Guard (push) Has been skipped
CI - 4NK_node / Performance Tests (push) Successful in 34s
CI - 4NK_node / Notify (push) Failing after 2s
CI - 4NK_node / Publish Release (push) Has been skipped
This commit is contained in:
parent
3488b497de
commit
3b20dfd9ae
@ -3,6 +3,8 @@ name: CI - 4NK_node
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
|
||||
@ -360,3 +362,33 @@ jobs:
|
||||
run: |
|
||||
echo "❌ Some tests failed!"
|
||||
exit 1
|
||||
|
||||
publish-release:
|
||||
name: Publish Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [release-guard]
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Create Gitea release
|
||||
env:
|
||||
TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
TAG_REF: ${{ github.ref }}
|
||||
API: https://git.4nkweb.com/api/v1/repos/4nk/4NK_node
|
||||
run: |
|
||||
set -e
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "Missing RELEASE_TOKEN secret" >&2
|
||||
exit 1
|
||||
fi
|
||||
TAG="${TAG_REF##*/}"
|
||||
STATUS=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $TOKEN" "$API/releases/tags/$TAG")
|
||||
if [ "$STATUS" != "200" ]; then
|
||||
BODY="Release ${TAG} - voir CHANGELOG.md"
|
||||
curl -s -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
|
||||
-X POST "$API/releases" \
|
||||
-d "{\"tag_name\":\"$TAG\",\"target_commitish\":\"main\",\"name\":\"$TAG\",\"body\":\"$BODY\",\"draft\":false,\"prerelease\":false}"
|
||||
fi
|
||||
curl -s -H "Authorization: token $TOKEN" "$API/releases/tags/$TAG" >/dev/null
|
||||
|
@ -89,6 +89,12 @@ pipeline {
|
||||
}
|
||||
```
|
||||
|
||||
#### Publication automatique des releases
|
||||
|
||||
- Définir un secret de repository nommé `RELEASE_TOKEN` (scope: write:repository) dans Gitea.
|
||||
- Le workflow `.gitea/workflows/ci.yml` publie automatiquement une release lors d’un push de tag `v*` en utilisant ce secret.
|
||||
- Le corps de la release référence `CHANGELOG.md`. Pour des notes plus détaillées, mettez à jour le changelog avant de créer le tag.
|
||||
|
||||
### Option 3 : GitHub Actions (Migration)
|
||||
|
||||
Si vous souhaitez utiliser GitHub Actions avec un miroir :
|
||||
@ -277,5 +283,3 @@ events:
|
||||
---
|
||||
|
||||
**Configuration Gitea terminée ! Le projet est prêt pour l'open source sur git.4nkweb.com** 🚀
|
||||
|
||||
|
||||
|
@ -46,5 +46,3 @@ echo "$resp_get" | grep -q "\"value\":\"${val_hex}\"" || fail "valeur inattendue
|
||||
|
||||
log "Succès: /storage opérationnel via reverse proxy"
|
||||
exit 0
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user