-
Notifications
You must be signed in to change notification settings - Fork 0
203 lines (141 loc) · 4.74 KB
/
Copy pathci.yaml
File metadata and controls
203 lines (141 loc) · 4.74 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
---
name: 'CI'
on:
push:
branches:
- '**'
tags:
- '*'
env:
GIT_SYNC_URL: "https://${{ secrets.GITLAB_USERNAME_ROBOT }}:${{ secrets.GITLAB_TOKEN_ROBOT }}@gitlab.com/nofusscomputing/projects/centurion_erp.git"
jobs:
mkdocs:
name: 'MKDocs'
permissions:
pull-requests: write
contents: write
statuses: write
checks: write
actions: write
uses: nofusscomputing/action_mkdocs/.github/workflows/reusable_mkdocs.yaml@development
python:
name: 'Python'
uses: nofusscomputing/action_python/.github/workflows/python.yaml@development
secrets:
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
python-build:
name: 'Python'
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: nofusscomputing/action_python/.github/workflows/python-package.yaml@development
python-build_tag:
name: 'Python'
if: startsWith(github.ref, 'refs/tags/')
uses: nofusscomputing/action_python/.github/workflows/python-package.yaml@development
docker:
name: 'Docker'
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
needs:
- python-build
uses: nofusscomputing/action_docker/.github/workflows/docker.yaml@development
with:
DOCKER_BUILD_IMAGE_NAME: "nofusscomputing/centurion-erp"
DOCKER_PUBLISH_REGISTRY: "docker.io"
DOCKER_PUBLISH_IMAGE_NAME: "nofusscomputing/centurion-erp"
secrets:
DOCKER_PUBLISH_USERNAME: ${{ secrets.NFC_DOCKERHUB_USERNAME }}
DOCKER_PUBLISH_PASSWORD: ${{ secrets.NFC_DOCKERHUB_TOKEN }}
docker_tag:
name: 'Docker'
if: startsWith(github.ref, 'refs/tags/')
needs:
- python-build_tag
uses: nofusscomputing/action_docker/.github/workflows/docker.yaml@development
with:
DOCKER_BUILD_IMAGE_NAME: "nofusscomputing/centurion-erp"
DOCKER_PUBLISH_REGISTRY: "docker.io"
DOCKER_PUBLISH_IMAGE_NAME: "nofusscomputing/centurion-erp"
secrets:
DOCKER_PUBLISH_USERNAME: ${{ secrets.NFC_DOCKERHUB_USERNAME }}
DOCKER_PUBLISH_PASSWORD: ${{ secrets.NFC_DOCKERHUB_TOKEN }}
integration-test:
name: 'Integration Test'
uses: nofusscomputing/action_python/.github/workflows/python-integration.yaml@development
needs:
- docker
with:
POSTGRES_VERSIONS: '[ "13", "14", "15", "16", "17" ]'
PYTHON_VERSION: '3.11'
RABBITMQ_VERSIONS: '[ "3.12", "3.13", "4.0", "4.1" ]'
secrets:
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
integration-test_tag:
name: 'Integration Test'
uses: nofusscomputing/action_python/.github/workflows/python-integration.yaml@development
needs:
- docker_tag
with:
POSTGRES_VERSIONS: '[ "13", "14", "15", "16", "17" ]'
PYTHON_VERSION: '3.11'
RABBITMQ_VERSIONS: '[ "3.12", "3.13", "4.0", "4.1" ]'
secrets:
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
python-publish:
name: Python
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/centurion-erp/
permissions:
id-token: write
needs:
- python-build_tag
steps:
- name: Download built artifact to dist/
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
gitlab-mirror:
if: ${{ github.repository == 'nofusscomputing/centurion_erp' }}
runs-on: ubuntu-latest
steps:
- name: Checks
shell: bash
run: |
if [ "0${{ env.GIT_SYNC_URL }}" == "0" ]; then
echo "[ERROR] you must define variable GIT_SYNC_URL for mirroring this repository.";
exit 1;
fi
- name: clone
shell: bash
run: |
git clone --mirror https://github.com/${{ github.repository }} repo;
ls -la repo/
- name: add remote
shell: bash
run: |
cd repo;
echo "**************************************** - git remote -v";
git remote -v;
echo "****************************************";
git remote add destination $GIT_SYNC_URL;
- name: push branches
shell: bash
run: |
cd repo;
echo "**************************************** - git branch";
git branch;
echo "****************************************";
# git push destination --all --force;
git push destination --mirror || true;
# - name: push tags
# shell: bash
# run: |
# cd repo;
# echo "**************************************** - git tag";
# git tag;
# echo "****************************************";
# git push destination --tags --force;