diff --git a/.github/workflows/ci.yml b/.github/workflows/build.yml similarity index 54% rename from .github/workflows/ci.yml rename to .github/workflows/build.yml index 83fde84..0e18747 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/build.yml @@ -1,53 +1,18 @@ -name: ci +name: Build on: - pull_request: - push: - branches: [main] + workflow_run: + workflows: [Tests] + types: + - completed env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} jobs: - prepare: + build: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: docker/setup-buildx-action@v3 - - name: build ci image - uses: docker/build-push-action@v5 - with: - context: . - tags: teufa:ci - target: ci - load: true - cache-from: type=gha - cache-to: type=gha,mode=max - push: false - - tests: - runs-on: ubuntu-latest - needs: prepare - container: teufa:ci - services: - postgres: - image: postgres - env: - POSTGRES_PASSWORD: postgres - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - steps: - - run: pytest - - build-push: - runs-on: ubuntu-latest - needs: tests permissions: contents: read packages: write