Files
bandwidth_probing/.gitea/workflows/pipeline.yaml
T
brb e0ac9bb0cc
pipeline / Show Gitea.ref (push) Successful in 4s
pipeline / Test (push) Successful in 38s
pipeline / Publish (push) Failing after 10s
changed publish workflow
2023-07-11 17:14:15 +02:00

59 lines
1.7 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: pipeline
run-name: ${{ gitea.actor }} is running script
runs-on: ubuntu-latest
on: [push]
image: python:3.10
jobs:
show-gitea-ref:
name: Show Gitea.ref
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Show
run: echo "${{ gitea.ref }}"
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'
steps:
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: user/app:v0.2.0
# env:
# repository_host: 192.168.1.2:5000
# repository_name: ${{ gitea.repository }}
# repository_tag: latest
# steps:
# - uses: actions/checkout@v3
# - name: Build
# run: docker build . --file Dockerfile --tag ${repository_name}:${repository_tag}
# - 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}