2023-06-25 11:37:42 +02:00
|
|
|
name: dl
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
2023-06-25 12:30:44 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-25 17:13:47 +02:00
|
|
|
container: python:3.10
|
2023-06-25 11:37:42 +02:00
|
|
|
steps:
|
2023-06-25 17:13:47 +02:00
|
|
|
- run: apt-get update
|
|
|
|
- run: apt-get install -y git nodejs
|
2023-06-25 11:37:42 +02:00
|
|
|
- uses: actions/checkout@v3
|
2023-06-30 15:10:35 +02:00
|
|
|
- uses: Gr1N/setup-poetry@v8
|
2023-06-25 15:18:54 +02:00
|
|
|
- run: poetry install
|
2023-06-25 11:37:42 +02:00
|
|
|
- run: poetry run flake8 .
|
|
|
|
- run: poetry run mypy .
|
|
|
|
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
2023-06-25 15:37:51 +02:00
|
|
|
container: docker
|
2023-06-25 11:42:18 +02:00
|
|
|
needs: [lint]
|
2023-06-25 11:37:42 +02:00
|
|
|
steps:
|
2023-06-25 15:51:45 +02:00
|
|
|
- run: apk add git nodejs
|
2023-06-25 15:43:17 +02:00
|
|
|
- uses: actions/checkout@v3
|
2023-06-30 15:10:35 +02:00
|
|
|
- uses: docker/metadata-action@v4
|
2023-06-25 16:05:01 +02:00
|
|
|
id: meta
|
2023-06-25 11:37:42 +02:00
|
|
|
with:
|
2023-06-25 15:54:23 +02:00
|
|
|
images: xefir/dl
|
2023-07-01 17:33:09 +02:00
|
|
|
tags: |
|
|
|
|
type=schedule
|
|
|
|
type=ref,event=tag
|
|
|
|
type=ref,event=pr
|
|
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
2023-06-30 15:10:35 +02:00
|
|
|
- uses: docker/login-action@v2
|
2023-06-25 11:37:42 +02:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2023-06-30 15:10:35 +02:00
|
|
|
- uses: docker/build-push-action@v4
|
2023-06-25 11:37:42 +02:00
|
|
|
with:
|
2023-06-25 23:03:37 +02:00
|
|
|
push: ${{ gitea.ref == 'refs/heads/master' || startsWith(gitea.ref, 'refs/tags') }}
|
2023-06-25 11:37:42 +02:00
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|