dl/.gitea/workflows/dl.yml

42 lines
1.1 KiB
YAML
Raw Normal View History

2023-06-25 09:37:42 +00:00
name: dl
on: [push]
jobs:
lint:
2023-06-25 10:30:44 +00:00
runs-on: ubuntu-latest
2024-12-05 06:40:14 +00:00
container: python:3.13.1
2023-06-25 09:37:42 +00:00
steps:
2023-06-25 15:13:47 +00:00
- run: apt-get update
- run: apt-get install -y git nodejs
2023-09-28 22:42:59 +00:00
- uses: actions/checkout@v4
- uses: Gr1N/setup-poetry@v9
2023-06-25 13:18:54 +00:00
- run: poetry install
- run: poetry run ruff check .
2023-06-25 09:37:42 +00:00
- run: poetry run mypy .
docker:
runs-on: ubuntu-latest
2023-06-25 13:37:51 +00:00
container: docker
2023-06-25 09:42:18 +00:00
needs: [lint]
2023-06-25 09:37:42 +00:00
steps:
2023-06-25 13:51:45 +00:00
- run: apk add git nodejs
2023-09-28 22:42:59 +00:00
- uses: actions/checkout@v4
- uses: docker/metadata-action@v5
2023-06-25 14:05:01 +00:00
id: meta
2023-06-25 09:37:42 +00:00
with:
2023-09-15 07:59:41 +00:00
images: xefir/dl
2023-07-01 15:33:09 +00:00
tags: |
type=schedule
type=ref,event=tag
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
2023-09-28 22:42:59 +00:00
- uses: docker/login-action@v3
2023-06-25 09:37:42 +00:00
with:
2023-09-15 07:59:41 +00:00
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v6
2023-06-25 09:37:42 +00:00
with:
push: ${{ gitea.ref_name == gitea.event.repository.default_branch || gitea.ref_type == 'tag' }}
2023-06-25 09:37:42 +00:00
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}