This repository has been archived on 2023-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
PyNyaaTa/.gitea/workflows/pynyaata.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

2023-06-25 16:26:56 +00:00
name: books
on: [push]
jobs:
flake8:
runs-on: ubuntu-latest
container: python
steps:
- run: apt-get update
- run: apt-get install -y git nodejs
- uses: actions/checkout@v3
- run: pip install flake8
- run: flake8 pynyaata
docker:
runs-on: ubuntu-latest
container: docker
needs: [lint]
steps:
- run: apk add git nodejs
- uses: actions/checkout@v3
2023-06-30 13:20:57 +00:00
- uses: docker/metadata-action@v4
2023-06-25 16:26:56 +00:00
id: meta
with:
images: xefir/pynyaata
2023-06-25 20:48:25 +00:00
flavor: latest=${{ gitea.ref == 'refs/heads/master' }}
2023-06-30 13:20:57 +00:00
- uses: docker/login-action@v2
2023-06-25 16:26:56 +00:00
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2023-06-30 13:20:57 +00:00
- uses: docker/build-push-action@v4
2023-06-25 16:26:56 +00:00
with:
2023-06-25 20:48:25 +00:00
push: ${{ gitea.ref == 'refs/heads/master' || startsWith(gitea.ref, 'refs/tags') }}
2023-06-25 16:26:56 +00:00
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
pypi:
runs-on: ubuntu-latest
2023-06-25 16:38:52 +00:00
container: python
2023-06-25 16:26:56 +00:00
needs: [lint]
2023-06-30 15:26:27 +00:00
if: ${{ gitea.ref == 'refs/heads/master' || startsWith(gitea.ref, 'refs/tags') }}
2023-06-25 16:26:56 +00:00
steps:
2023-06-25 16:38:52 +00:00
- run: apt-get update
- run: apt-get install -y git nodejs
2023-06-25 16:26:56 +00:00
- uses: actions/checkout@v3
2023-06-30 20:01:00 +00:00
- run: pip install twine
- run: python setup.py sdist
2023-06-30 20:09:40 +00:00
- run: twine upload dist/*
2023-06-30 20:01:00 +00:00
env:
2023-06-30 20:14:02 +00:00
TWINE_USERNAME: __token__
2023-06-30 20:09:40 +00:00
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}