Skip to content

Commit

Permalink
feat: add option for additonal commands in all workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
freekvandeven committed Sep 20, 2023
1 parent 6ea032a commit 5840a6e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/app-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
channel: 'stable'
cache: true
cache-key: ${{ runner.OS }}-flutter-install-cache
- name: Project preparation
run: flutter pub get
- name: Run additional commands
if: inputs.additional_commands != ''
run: |
${{ inputs.additional_commands }}
- name: Project preparation
run: flutter pub get
- name: Create dotenv and .env file from GitHub Secrets
run: |
if [[ -n "${DOTENV_BASE64}" ]]; then
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/component-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ on:
description: 'Subfolder where the Flutter project is located'
required: false
default: '.'
additional_commands:
type: string
description: 'Additional commands to be run after flutter pub get'
required: false
default: ''

jobs:
lint:
defaults:
Expand All @@ -25,6 +31,10 @@ jobs:
channel: 'stable'
cache: true
cache-key: ${{ runner.OS }}-flutter-install-cache
- name: Run additional commands
if: inputs.additional_commands != ''
run: |
${{ inputs.additional_commands }}
- name: Flutter pub get
run: flutter pub get
- name: Flutter format
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/firebase-web-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
type: string
description: 'Optional target string for action-hosting-deploy'
required: false
additional_commands:
type: string
description: 'Additional commands to be run after flutter pub get'
required: false
default: ''

env:
PROJECT_ID: ${{ vars.PROJECT_ID }}
Expand All @@ -48,6 +53,11 @@ jobs:
env:
DOTENV_BASE64: ${{ env.DOTENV_BASE64 }}
run: echo -n "${DOTENV_BASE64}" | base64 -d > dotenv
- name: Run additional commands
if: inputs.additional_commands != ''
run: |
${{ inputs.additional_commands }}
shell: bash
- name: Build Flutter Web App
run: |
flutter pub get
Expand Down

0 comments on commit 5840a6e

Please sign in to comment.