Skip to content

Problem with YAML syntax #25495

Answered by thomasjo
lpzhang-code asked this question in Actions
Discussion options

You must be logged in to vote

Thanks for that. The problem is caused by missing indentation in the multiline block for the Bash script. Add indentation to the entire Bash script block and your problem should be resolved.

name: Deploy Application
on: [workflow_dispatch]
jobs:
    deploy:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v2
            - name: Set variables
              run: |
                if [ "${{ github.ref }}" = "refs/heads/develop" ]; then
                    echo "::set-env name=COMPOSE_SUFFIX::staging"
                    echo "::set-env name=PROJECT::clerk_test"
                elif [ "${{ github.ref }}" = "refs/heads/master" ]; then
                    echo …

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@LilyAnderssonLee
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants