From da554410b00985409d772ab68bf845b44bbf5f4c Mon Sep 17 00:00:00 2001 From: Brendon Smith Date: Fri, 4 Oct 2024 18:20:25 -0400 Subject: [PATCH] Move smoke test to reusable workflow --- .../workflows/build-and-push-docker-image.yml | 4 ++++ ...e-test-action.yml => reusable-smoke-test.yml} | 16 ++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) rename .github/workflows/{self-smoke-test-action.yml => reusable-smoke-test.yml} (90%) diff --git a/.github/workflows/build-and-push-docker-image.yml b/.github/workflows/build-and-push-docker-image.yml index f8e9ae5..fda55e5 100644 --- a/.github/workflows/build-and-push-docker-image.yml +++ b/.github/workflows/build-and-push-docker-image.yml @@ -49,3 +49,7 @@ jobs: docker push $IMAGE docker push $IMAGE_MAJOR docker push $IMAGE_MAJOR_MINOR + smoke-test: + needs: + - build-and-push + uses: ./.github/workflows/reusable-smoke-test.yml diff --git a/.github/workflows/self-smoke-test-action.yml b/.github/workflows/reusable-smoke-test.yml similarity index 90% rename from .github/workflows/self-smoke-test-action.yml rename to .github/workflows/reusable-smoke-test.yml index ddddf83..ac59f08 100644 --- a/.github/workflows/self-smoke-test-action.yml +++ b/.github/workflows/reusable-smoke-test.yml @@ -1,12 +1,9 @@ --- -name: 🧪 +name: ♻️ 🧪 on: # yamllint disable-line rule:truthy - pull_request: - workflow_run: - workflows: [🏗️] - types: [completed] + workflow_call: env: devpi-password: abcd1234 @@ -30,9 +27,6 @@ env: jobs: fail-fast: - if: >- - github.event_name == 'pull_request' || - github.event.workflow_run.conclusion == 'success' strategy: matrix: @@ -44,7 +38,7 @@ jobs: steps: - name: Check out the action locally - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: test - name: Fail-fast in unsupported environments @@ -58,9 +52,7 @@ jobs: exit 1 smoke-test: - if: >- - github.event_name == 'pull_request' || - github.event.workflow_run.conclusion == 'success' + runs-on: ubuntu-latest services: