diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2612c31..35d641e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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}} diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 0000000..9eb1e04 --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -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 +