Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
command: "compose up --dry-run --project-name github-action-test"

- name: Teardown
run: defang config rm DEFANG_GH_ACTION_TEST_MESSAGE
run: defang config rm --project-name github-action-test DEFANG_GH_ACTION_TEST_MESSAGE
18 changes: 18 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@ runs:
params+=("-f")
params+=("$filename")
done
empty=()
for source in $CONFIG_ENV_VARS; do
if [ -z "${!source}" ]; then
empty+=("$source")
fi
done

# if there are any empty variables, print instructions on how to update
# the github environment variables
if [ ${#empty[@]} -gt 0 ]; then
echo "Some Defang config vars do not have values. To use Github Secrets, add"
echo "these variables to your environment secrets:"
for source in "${empty[@]}"; do
echo "- $source"
done
echo "Here is a link to your repository environments settings:"
echo "https://github.com/${GITHUB_REPOSITORY}/settings/environments"
fi
for source in $CONFIG_ENV_VARS; do
echo "Updating $source"
echo defang config "${params[@]}" set -e $source
Expand Down