Compare commits
39
Commits
2cdc184a1b
...
v0.0.17
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a1724742a | ||
|
|
20023ca9a9 | ||
|
|
478d258a31 | ||
|
|
eb8b1456ab | ||
|
|
4c99b6a1af | ||
|
|
0becddf81f | ||
|
|
233c0ef977 | ||
|
|
11e3c866de | ||
|
|
ce43e1fa38 | ||
|
|
9c9722615f | ||
|
|
9ad983cc1c | ||
|
|
10821f94df | ||
|
|
550551c4a0 | ||
|
|
5709c7152a | ||
|
|
a8b27d8f21 | ||
|
|
2cd449e130 | ||
|
|
91b22a781c | ||
|
|
6f7201054b | ||
|
|
697973a454 | ||
|
|
77c749cfb8 | ||
|
|
aa358bd361 | ||
|
|
3ecea06979 | ||
|
|
6a48b900c8 | ||
|
|
4fff9100e2 | ||
|
|
a8dae35cd0 | ||
|
|
b62fb0c4fa | ||
|
|
2d9b06be5d | ||
|
|
5280cd1d8b | ||
|
|
e0ac9bb0cc | ||
|
|
c3203f024b | ||
|
|
65621ed484 | ||
|
|
29dd4543c3 | ||
|
|
ef416de1a7 | ||
|
|
d16c9aa5bc | ||
|
|
455d82d0f0 | ||
|
|
182a2f70b6 | ||
|
|
a81e2a89c9 | ||
|
|
2041d42e76 | ||
|
|
c7c3631d8d |
@@ -0,0 +1,52 @@
|
|||||||
|
name: pipeline
|
||||||
|
run-name: ${{ gitea.actor }} is running script
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- "release"
|
||||||
|
image: python:3.10
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Python 3.10
|
||||||
|
uses: https://github.com/actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
architecture: "x64"
|
||||||
|
- name: Install Packages
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install flake8 mypy pytest
|
||||||
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
|
- name: PEP8 check
|
||||||
|
run: flake8 ./code --benchmark --exit-zero
|
||||||
|
- name: Type check
|
||||||
|
run: mypy ./code
|
||||||
|
# publish:
|
||||||
|
# name: Publish
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs: [test]
|
||||||
|
# if: gitea.ref == 'refs/heads/release'
|
||||||
|
# env:
|
||||||
|
# repository_host: 192.168.1.2:5000
|
||||||
|
# repository_name: ${{ gitea.repository }}
|
||||||
|
# repository_version: v1.0
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: Build
|
||||||
|
# run: |
|
||||||
|
# echo "> docker build . --file Dockerfile --tag ${repository_name}:${repository_version}"
|
||||||
|
# docker build . --file Dockerfile --tag ${repository_name}:${repository_version}
|
||||||
|
# - name: Tag
|
||||||
|
# run: |
|
||||||
|
# echo "> docker tag ${repository_name}:${repository_version} ${repository_host}/${repository_name}:${repository_version}"
|
||||||
|
# docker tag ${repository_name}:${repository_version} ${repository_host}/${repository_name}:${repository_version}
|
||||||
|
# - name: Push
|
||||||
|
# run: |
|
||||||
|
# echo "> docker push ${repository_host}/${repository_name}:${repository_version}"
|
||||||
|
# docker push ${repository_host}/${repository_name}:${repository_version}
|
||||||
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
name: pipeline
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
on: [push]
|
|
||||||
image: python:3.10
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set up Python 3.10
|
|
||||||
uses: https://github.com/actions/setup-python@v3
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
architecture: "x64"
|
|
||||||
- name: Install Packages
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install flake8 mypy pytest
|
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
||||||
- name: PEP8 check
|
|
||||||
run: |
|
|
||||||
flake8 ./code --benchmark --exit-zero
|
|
||||||
- name: Type check
|
|
||||||
run: |
|
|
||||||
mypy ./code
|
|
||||||
deploy:
|
|
||||||
name: Deploy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [test]
|
|
||||||
if: gitea.ref == 'refs/heads/release'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build image
|
|
||||||
run: |
|
|
||||||
# docker build . --file Dockerfile --tag ${{}}
|
|
||||||
echo "test message"
|
|
||||||
echo "${{ gitea.actor }}"
|
|
||||||
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
name: Docker
|
||||||
|
run-name: Build and Publish Service
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Python 3.10
|
||||||
|
uses: https://github.com/actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
architecture: "x64"
|
||||||
|
- name: Install Packages
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install flake8 mypy pytest
|
||||||
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
|
- name: PEP8 check
|
||||||
|
run: flake8 ./code --benchmark --exit-zero
|
||||||
|
- name: Type check
|
||||||
|
run: mypy ./code
|
||||||
|
publish:
|
||||||
|
name: Publish
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [test]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Set Environment Variables
|
||||||
|
id: vars
|
||||||
|
env:
|
||||||
|
repository: ${{gitea.repository}}
|
||||||
|
ref_name: ${{gitea.ref_name}}
|
||||||
|
run: |
|
||||||
|
echo $repository
|
||||||
|
echo ::set-output name=OWNER::${repository#/*}
|
||||||
|
echo ::set-output name=PROJECT::${repository#*/}
|
||||||
|
echo $ref_name
|
||||||
|
echo ::set-output name=TAG::${ref_name#refs/*/}
|
||||||
|
-
|
||||||
|
name: Push Image
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: 192.168.1.2:5000/${{gitea.repository}}:${{steps.vars.outputs.TAG}}
|
||||||
Reference in New Issue
Block a user