Files
bandwidth_probing/.gitea/workflows/release.yaml
T
brb ce43e1fa38
Docker / Test (push) Successful in 39s
Docker / Publish (push) Failing after 5s
added code to extract version number
2023-07-12 11:01:40 +02:00

49 lines
1.3 KiB
YAML

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
run: |
echo "TAG=${GITEA_REF#refs/*/}" >> $GITEA_ENV
-
name: Show Environment Variables
run: |
echo "$TAG"
-
name: Push Image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: 192.168.1.2:5000/${{gitea.repository}}:${{steps.get_version.outputs.VERSION}}