From d27fc93f756f6f84d85ca1bddef8028dca25b806 Mon Sep 17 00:00:00 2001 From: pictuga Date: Mon, 26 Jun 2023 01:28:33 +0200 Subject: [PATCH] actions: clean up --- .github/workflows/default.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 88624f2..6b34325 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -8,25 +8,34 @@ jobs: test-lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - - run: apt-get -y update && apt-get -y install python3-pip libenchant-2-2 aspell-en - - run: pip3 install .[full] .[dev] + + - name: Prepare image + run: apt-get -y update && apt-get -y install python3-pip libenchant-2-2 aspell-en + + - name: Install dependencies + run: pip3 install .[full] .[dev] - run: isort --check-only --diff . - run: pylint morss --rcfile=.pylintrc --disable=C,R,W --fail-under=8 - run: pytest --cov=morss tests - - publish-deploy: + python-publish: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - - run: apt-get -y update && apt-get -y install python3-pip python3-build - - run: python3 -m build + + - name: Prepare image + run: apt-get -y update && apt-get -y install python3-pip python3-build + + - name: Build package + run: python3 -m build + - name: Publish package uses: https://github.com/pypa/gh-action-pypi-publish@release/v1 with: @@ -50,22 +59,26 @@ jobs: sudo rm -r dist sudo morss-helper reload - docker-publish: + docker-publish-deploy: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: - name: Checkout uses: actions/checkout@v3 + - name: Set up QEMU uses: https://github.com/docker/setup-qemu-action@v2 + - name: Set up Docker Buildx uses: https://github.com/docker/setup-buildx-action@v2 + - name: Login to Docker Hub uses: https://github.com/docker/login-action@v2 with: username: ${{ secrets.docker_user }} password: ${{ secrets.docker_pwd }} + - name: Build and push uses: https://github.com/docker/build-push-action@v4 with: