Skip to content

Commit

Permalink
Restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffmur committed Dec 21, 2023
1 parent 3db4483 commit 4f543c0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
27 changes: 7 additions & 20 deletions .github/workflows/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reuse-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
push:
description: 'Upload artifact to Docker Container Repository'
default: false
default: 'false'
type: boolean
image:
description: 'Docker Image'
Expand Down Expand Up @@ -47,5 +47,5 @@ jobs:
file: ${{ inputs.file }}

- name: Deploy 🚀
if: ${{ inputs.deploy == true }}
if: ${{ inputs.deploy == 'true' }}
run: echo "Pushed ${{ inputs.image }}"

0 comments on commit 4f543c0

Please sign in to comment.