Skip to content

Commit

Permalink
Change behavior to mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lionello committed Aug 30, 2024
1 parent 2587523 commit e67be4b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
branches:
- '**'
workflow_dispatch:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

Expand All @@ -30,7 +30,7 @@ jobs:
config-env-vars: "DEFANG_GH_ACTION_TEST_MESSAGE"
cwd: "./test"
compose-files: "compose.yaml compose.prod.yaml"
behavior: "staging"
mode: "staging"
env:
DEFANG_GH_ACTION_TEST_MESSAGE: ${{ secrets.MESSAGE }}
DEFANG_INTERNAL_TEST: dfng-test
Expand All @@ -43,7 +43,7 @@ jobs:
config-env-vars: ""
cwd: "./test"
compose-files: ""
behavior: ""
mode: ""
env:
DEFANG_INTERNAL_TEST: dfng-test

Expand Down
12 changes: 6 additions & 6 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ inputs:
description: "The compose files to deploy. Format 'file1 file2 file3'"
required: false
default: ""
behavior:
description: "The behavior of the deployment. Options: 'development', 'staging', 'production'"
mode:
description: "The deployment mode. Options: 'development', 'staging', 'production'"
required: false
default: "development"
default: ""

runs:
using: "composite"
Expand Down Expand Up @@ -69,12 +69,12 @@ runs:
params+=("-f")
params+=("$filename")
done
if [[ -n "${{ inputs['behavior'] }}" ]]; then
params+=("--behavior=${{ inputs['behavior'] }}")
if [[ -n "${{ inputs['mode'] }}" ]]; then
params+=("--mode=${{ inputs['mode'] }}")
fi
if [[ "${DEFANG_INTERNAL_TEST}" == "dfng-test" ]]; then
# `defang compose up --dry-run` is used for testing as --behavior flag is only available to the "compose up" command
# `defang compose up --dry-run` is used for testing as --mode flag is only available to the "compose up" command
echo defang compose "${params[@]}" up --dry-run
defang compose "${params[@]}" up --dry-run
else
Expand Down

0 comments on commit e67be4b

Please sign in to comment.