From 099b75fb7460aaabc1402e0982a25e6cf11527a8 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Sun, 19 May 2024 09:29:05 -0600 Subject: [PATCH] add build workflow --- .github/workflows/{ci.yml => build.yml} | 47 ++++--------------------- 1 file changed, 6 insertions(+), 41 deletions(-) rename .github/workflows/{ci.yml => build.yml} (54%) 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