18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@@ -17,11 +17,13 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: dev
|
||||
|
||||
- name: Lint the Dockerfile
|
||||
uses: hadolint/hadolint-action@v3.1.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
- name: Lint the source code
|
||||
|
||||
- name: Lint the source code # TODO: use pylint from pip -- it can fail
|
||||
uses: Silleellie/pylint-github-action@v2.1
|
||||
with:
|
||||
lint-path: |
|
||||
@@ -31,6 +33,7 @@ jobs:
|
||||
requirements-path: requirements.txt
|
||||
readme-path: README.md
|
||||
python-version: 3.11 # python version which will lint the package
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
@@ -49,10 +52,21 @@ jobs:
|
||||
to: ${{ secrets.TELEGRAM_TO }}
|
||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||
message: |
|
||||
${{ github.actor }} created commit:
|
||||
PyTest success
|
||||
Commit message: ${{ github.event.commits[0].message }}
|
||||
Repository: ${{ github.repository }}
|
||||
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
|
||||
|
||||
- name: Check fail
|
||||
run: echo "Unreachable"
|
||||
|
||||
- name: Notify in telegram about success
|
||||
uses: appleboy/telegram-action@master
|
||||
with:
|
||||
to: ${{ secrets.TELEGRAM_TO }}
|
||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||
message: |
|
||||
Workflow success
|
||||
Commit message: ${{ github.event.commits[0].message }}
|
||||
Repository: ${{ github.repository }}
|
||||
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
|
||||
|
||||
17
.github/workflows/docker-build.yaml
vendored
Normal file
17
.github/workflows/docker-build.yaml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: Build and push Docker image
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
if_merged:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
echo The PR was merged
|
||||
|
||||
Reference in New Issue
Block a user