Skip to content

Use double quotes around $GITHUB_OUTPUT in GitHub Actions workflows #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/CI-BUILD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
- id: check_status
run: |
if [[ "${{ needs.BUILD.result }}" == "success" && "${{ needs.BOOTSTRAP.result }}" == "success" ]]; then
echo "build_success=true" >> $GITHUB_OUTPUT
echo "build_success=true" >> "$GITHUB_OUTPUT"
else
echo "build_success=false" >> $GITHUB_OUTPUT
echo "build_success=false" >> "$GITHUB_OUTPUT"
fi
12 changes: 6 additions & 6 deletions .github/workflows/CI-MATs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ jobs:
- id: check
run: |
if [[ "${{ github.event.workflow_run.conclusion }}" == "success" ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "should_run=true" >> "$GITHUB_OUTPUT"
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "should_run=false" >> "$GITHUB_OUTPUT"
fi
- id: get_env
run: |
ENV_VALUE=$(gh api "${{ github.event.workflow_run.artifacts_url }}" --jq '.environment')
if [[ -n "$ENV_VALUE" ]]; then
echo "environment=$ENV_VALUE" >> $GITHUB_OUTPUT
echo "environment=$ENV_VALUE" >> "$GITHUB_OUTPUT"
else
echo "environment=Experimenting" >> $GITHUB_OUTPUT # Default fallback
echo "environment=Experimenting" >> "$GITHUB_OUTPUT" # Default fallback
fi

MATS:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
- id: check_status
run: |
if [[ "${{ needs.MATS.result }}" == "success" ]]; then
echo "mats_success=true" >> $GITHUB_OUTPUT
echo "mats_success=true" >> "$GITHUB_OUTPUT"
else
echo "mats_success=false" >> $GITHUB_OUTPUT
echo "mats_success=false" >> "$GITHUB_OUTPUT"
fi
8 changes: 4 additions & 4 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ jobs:
- id: check
run: |
if [[ "${{ github.event.workflow_run.conclusion }}" == "success" ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "should_run=true" >> "$GITHUB_OUTPUT"
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "should_run=false" >> "$GITHUB_OUTPUT"
fi
- id: get_env
run: |
ENV_VALUE=$(gh api "${{ github.event.workflow_run.artifacts_url }}" --jq '.environment')
if [[ -n "$ENV_VALUE" ]]; then
echo "environment=$ENV_VALUE" >> $GITHUB_OUTPUT
echo "environment=$ENV_VALUE" >> "$GITHUB_OUTPUT"
else
echo "environment=Experimenting" >> $GITHUB_OUTPUT # Default fallback
echo "environment=Experimenting" >> "$GITHUB_OUTPUT" # Default fallback
fi


Expand Down
Loading