From a275c1e1f365b115c1c7bcc1d4ee6295a08d085a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 18 Nov 2023 10:46:29 +0100 Subject: [PATCH] CI: fix incorrect syntax --- .../workflows/build-docker.yml | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) rename {.gitea => .github}/workflows/build-docker.yml (65%) diff --git a/.gitea/workflows/build-docker.yml b/.github/workflows/build-docker.yml similarity index 65% rename from .gitea/workflows/build-docker.yml rename to .github/workflows/build-docker.yml index 7b7235d..d3d3c15 100644 --- a/.gitea/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -5,20 +5,28 @@ on: paths-ignore: [ 'README.md' ] jobs: - test: - runs-on: python:3.12 - steps: - - python -m pip install poetry - - poetry install - - poetry env info - - poetry run python manage.py migrate - - poetry run pytest - build-and-push: + checkout: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v4 + test: + needs: checkout + runs-on: ubuntu-latest + container: python:3.12 + steps: + - name: Run test + run: | + python -m pip install poetry + poetry install + poetry env info + poetry run python manage.py migrate + poetry run pytest + build-and-push: + needs: test + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push