Compare commits
13
Commits
1f716aeb21
...
v0.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3203f024b | ||
|
|
65621ed484 | ||
|
|
29dd4543c3 | ||
|
|
ef416de1a7 | ||
|
|
d16c9aa5bc | ||
|
|
455d82d0f0 | ||
|
|
182a2f70b6 | ||
|
|
a81e2a89c9 | ||
|
|
2041d42e76 | ||
|
|
c7c3631d8d | ||
|
|
2cdc184a1b | ||
|
|
2394bb856d | ||
|
|
65a693706a |
@@ -1,37 +1,50 @@
|
|||||||
name: pipeline
|
name: pipeline
|
||||||
|
run-name: ${{ gitea.actor }} is running script
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
on: [push]
|
on: [push]
|
||||||
image: python:3.10
|
image: python:3.10
|
||||||
jobs:
|
jobs:
|
||||||
|
show-gitea-ref:
|
||||||
|
name: Show Gitea.ref
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Show
|
||||||
|
run: echo "${{ gitea.ref }}"
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python 3.10
|
- name: Set up Python 3.10
|
||||||
uses: https://github.com/actions/setup-python@v3
|
uses: https://github.com/actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
architecture: "x64"
|
architecture: "x64"
|
||||||
- name: Install Packages
|
- name: Install Packages
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install flake8 mypy pytest
|
pip install flake8 mypy pytest
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
- name: PEP8 check
|
- name: PEP8 check
|
||||||
run: |
|
run: flake8 ./code --benchmark --exit-zero
|
||||||
flake8 ./code --benchmark --exit-zero
|
- name: Type check
|
||||||
- name: Type check
|
run: mypy ./code
|
||||||
run: |
|
publish:
|
||||||
mypy ./code
|
name: Publish
|
||||||
deploy:
|
|
||||||
name: Deploy
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test]
|
needs: [test]
|
||||||
if: gitea.ref == 'refs/heads/release'
|
if: gitea.ref == 'refs/heads/release'
|
||||||
|
env:
|
||||||
|
repository_host: 192.168.1.2:5000
|
||||||
|
repository_name: ${{ gitea.repository }}
|
||||||
|
repository_tag: latest
|
||||||
steps:
|
steps:
|
||||||
- name: Build image
|
- uses: actions/checkout@v3
|
||||||
run: |
|
- name: Build
|
||||||
# docker build . --file Dockerfile --tag ${{}}
|
run: docker build . --file Dockerfile --tag ${repository_name}:${repository_tag}
|
||||||
echo "${{ gitea.actor }}""
|
- name: Tag
|
||||||
|
run: docker tag ${repository_name}:${repository_tag} ${repository_host}/${repository_name}:${repository_tag}
|
||||||
|
- name: Push
|
||||||
|
run: docker push ${repository_host}/${repository_name}:${repository_tag}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user