Compare commits
18 Commits
fb7574a88a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 296834da62 | |||
|
|
beada81079 | ||
| e7924d7f14 | |||
|
|
0f9b75f8e4 | ||
| a612b01059 | |||
|
|
92d7293612 | ||
| 7cd6aa6a3c | |||
|
|
cfa1cb6726 | ||
| 46b1d26800 | |||
|
|
9747d65eda | ||
| 982eeb25db | |||
|
|
42243e4b28 | ||
| 50144f57bf | |||
|
|
9bc87ad1f5 | ||
| c613330968 | |||
|
|
fff3a4cb0a | ||
| c96c718c0c | |||
|
|
beea2c49c2 |
61
.gitea/workflows/ci.yml
Normal file
61
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
name: CI/CD Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
runs-on: act_runner_base
|
||||||
|
if: ${{ github.event.pull_request.merged == true }}
|
||||||
|
steps:
|
||||||
|
- name: Set up environment
|
||||||
|
run: |
|
||||||
|
echo "PR #${{ github.event.number }} merged into master"
|
||||||
|
echo "Source branch: ${{ github.event.pull_request.head.ref }}"
|
||||||
|
echo "Target branch: ${{ github.event.pull_request.base.ref }}"
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
echo "Running test suite..."
|
||||||
|
- name: Build project
|
||||||
|
run: |
|
||||||
|
echo "Building project..."
|
||||||
|
- name: Deploy
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
|
echo "Deploying to production..."
|
||||||
|
create-release:
|
||||||
|
runs-on: act_runner_base
|
||||||
|
needs: build-deploy
|
||||||
|
if: ${{ success() && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master' && startsWith(github.event.pull_request.title, 'v') }}
|
||||||
|
steps:
|
||||||
|
- name: Create release
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.RUNNER_TOKEN }}
|
||||||
|
GITEA_SERVER_URL: ${{ github.server_url }}
|
||||||
|
GITEA_REPOSITORY: ${{ github.repository }}
|
||||||
|
RELEASE_TAG: ${{ github.event.pull_request.title }}
|
||||||
|
RELEASE_TARGET: ${{ github.sha }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GITEA_TOKEN" ]; then
|
||||||
|
echo "Missing secrets.RUNNER_TOKEN"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
api_url="$GITEA_SERVER_URL/api/v1/repos/$GITEA_REPOSITORY/releases"
|
||||||
|
payload=$(cat <<EOF
|
||||||
|
{
|
||||||
|
"tag_name": "$RELEASE_TAG",
|
||||||
|
"name": "$RELEASE_TAG",
|
||||||
|
"target_commitish": "$RELEASE_TARGET",
|
||||||
|
"draft": false,
|
||||||
|
"prerelease": false
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
curl -sS -X POST "$api_url" \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$payload"
|
||||||
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/.idea
|
||||||
|
/.claude
|
||||||
|
/CLAUDE.md
|
||||||
|
/AGENTS.md
|
||||||
Reference in New Issue
Block a user