From 4f543c00d53d9544e3e33978ae66042d1217ec04 Mon Sep 17 00:00:00 2001 From: jeffmur Date: Thu, 21 Dec 2023 14:36:15 -0800 Subject: [PATCH] Restructure --- .github/workflows/deploy.yml | 22 ++++++++++++------- .github/workflows/feature.yml | 27 ++++++------------------ .github/workflows/reuse-build-deploy.yml | 4 ++-- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bf4b03e0..a93f4101 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,13 +9,19 @@ permissions: packages: write jobs: - build: + builder: name: Builder ๐Ÿ‘ท - uses: ./.github/workflows/reuse-build-deploy.yml + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Unit Tests ๐Ÿงช + uses: docker://ghcr.io/jeffmur/fhel:builder + with: + args: make test-dart-ci - test: - name: Unit Tests ๐Ÿงช - needs: build - uses: docker://ghcr.io/jeffmur/fhel:builder - with: - args: make test-dart-ci + - name: Push ๐Ÿ“ค + uses: ./.github/workflows/reuse-build-deploy.yml + with: + push: true diff --git a/.github/workflows/feature.yml b/.github/workflows/feature.yml index 8610caca..7e0c71f7 100644 --- a/.github/workflows/feature.yml +++ b/.github/workflows/feature.yml @@ -9,11 +9,9 @@ on: - main jobs: - changes: - name: Changes ๐Ÿ“ + test: + name: Unit Tests ๐Ÿงช runs-on: ubuntu-latest - outputs: - hasChanged: ${{ steps.changes.outputs.source }} steps: - name: Checkout repository @@ -27,22 +25,11 @@ jobs: source: - Builder.Dockerfile - build: - name: Build ๐Ÿšง - needs: changes - if: ${{ needs.changes.outputs.hasChanged == 'true' }} - uses: ./.github/workflows/reuse-build-deploy.yml - with: - push: false - - test: - name: Unit Tests ๐Ÿงช - needs: build - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Build ๐Ÿšง + if: ${{ steps.changes.outputs.source == 'true' }} + uses: ./.github/workflows/reuse-build-deploy.yml + with: + push: false - name: Dart Test ๐ŸŽฏ uses: docker://ghcr.io/jeffmur/fhel:builder diff --git a/.github/workflows/reuse-build-deploy.yml b/.github/workflows/reuse-build-deploy.yml index e5c42100..109bb43c 100644 --- a/.github/workflows/reuse-build-deploy.yml +++ b/.github/workflows/reuse-build-deploy.yml @@ -5,7 +5,7 @@ on: inputs: push: description: 'Upload artifact to Docker Container Repository' - default: false + default: 'false' type: boolean image: description: 'Docker Image' @@ -47,5 +47,5 @@ jobs: file: ${{ inputs.file }} - name: Deploy ๐Ÿš€ - if: ${{ inputs.deploy == true }} + if: ${{ inputs.deploy == 'true' }} run: echo "Pushed ${{ inputs.image }}"