Compare commits

..
16 Commits
Author SHA1 Message Date
brb c3203f024b added echo cmd
pipeline / Test (push) Successful in 39s
pipeline / Publish (push) Has been skipped
pipeline / Show Gitea.ref (push) Successful in 4s
2023-07-11 17:04:05 +02:00
brb 65621ed484 updated deploy job steps
pipeline / Deploy (push) Has been skipped
pipeline / Test (push) Successful in 38s
2023-07-11 16:46:51 +02:00
brb 29dd4543c3 updated deploy job steps
pipeline / Test (push) Successful in 1m2s
pipeline / Deploy (push) Failing after 5s
2023-07-11 16:39:49 +02:00
brb ef416de1a7 updated deploy job steps
pipeline / Deploy (push) Failing after 6s
pipeline / Test (push) Successful in 38s
2023-07-11 16:35:21 +02:00
brb d16c9aa5bc changed command
pipeline / Test (push) Successful in 39s
pipeline / Deploy (push) Successful in 5s
2023-07-11 15:55:38 +02:00
brb 455d82d0f0 removed comment
pipeline / demo (push) Successful in 6s
pipeline / Test (push) Successful in 39s
pipeline / Deploy (push) Successful in 49s
2023-07-11 15:41:15 +02:00
brb 182a2f70b6 added docker build command
pipeline / demo (push) Successful in 6s
pipeline / Test (push) Successful in 38s
pipeline / Deploy (push) Successful in 3s
2023-07-11 15:37:35 +02:00
brb a81e2a89c9 added demo job
pipeline / demo (push) Successful in 6s
pipeline / Test (push) Successful in 38s
pipeline / Deploy (push) Has been skipped
2023-07-11 15:33:24 +02:00
brb 2041d42e76 changed indentation
pipeline / Deploy (push) Has been skipped
pipeline / Test (push) Successful in 39s
2023-07-11 15:30:01 +02:00
brb c7c3631d8d added command
pipeline / Test (push) Successful in 38s
pipeline / Deploy (push) Successful in 4s
2023-07-11 15:23:27 +02:00
brb 2cdc184a1b added definition
pipeline / Test (push) Successful in 39s
pipeline / Deploy (push) Has been skipped
2023-07-11 15:08:54 +02:00
brb 2394bb856d updated script
pipeline / Test (push) Successful in 38s
pipeline / Deploy (push) Successful in 2s
2023-07-11 15:04:45 +02:00
brb 65a693706a updated deploy workflow
pipeline / Test (push) Successful in 39s
pipeline / Deploy (push) Successful in 3s
2023-07-11 15:02:55 +02:00
brb 1f716aeb21 updated flake8 outputs
pipeline / Test (push) Successful in 38s
pipeline / Deploy (push) Has been skipped
2023-07-11 14:32:29 +02:00
brb 2889601bc3 removed unused lines
pipeline / Test (push) Successful in 42s
pipeline / Deploy (push) Has been skipped
2023-07-11 14:22:14 +02:00
brb 1341fc5597 added runs-on
Python application / Test (push) Successful in 40s
Python application / Deploy (push) Has been skipped
2023-07-11 14:01:38 +02:00
+38 -26
View File
@@ -1,38 +1,50 @@
name: Python application name: pipeline
run-name: ${{ gitea.actor }} is building the application run-name: ${{ gitea.actor }} is running script
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 - 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 }}"" - 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}