-
Notifications
You must be signed in to change notification settings - Fork 17
89 lines (81 loc) · 2.44 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Realse Version
on:
pull_request:
types:
- closed
branches:
- master
jobs:
releaseGithub:
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- name: Bump version and push tag
id: bump
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v5
with:
mode: "COMMIT"
configurationJson: |
{
"template": "#{{CHANGELOG}}",
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feat", "feature"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix", "bug"]
},
{
"title": "## Other",
"labels": []
}
],
"label_extractor": [
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: (.*?)([\\s\\S]*)?",
"target": "$1"
}
]
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
fromTag: ${{ steps.bump.outputs.previous_tag }}
toTag: ${{ steps.bump.outputs.new_tag }}
- name: Create Release
uses: mikepenz/[email protected] #softprops/action-gh-release
with:
body: ${{steps.github_release.outputs.changelog}}
tag_name: ${{ steps.bump.outputs.new_tag }}
releaseDocker:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
needs: releaseGithub
steps:
- uses: actions/checkout@v4
- name: install requirements
run: pip install -r requirements.txt
- name: docker login
uses: docker/login-action@v3
with:
username: 81318131
password: ${{ secrets.DOCKER_PASSWORD }}
- name: build services
run: docker compose build
- name: push images
run: docker compose push