Skip to content

Docker Workflow #26847

Discussion options

You must be logged in to vote
lpzhang5:

I don’t know much about writing logic inside of YAML files, do you have any suggested resources?

There isn’t much. YAML itself is structured data. Github Actions defines some fields that can contain logic (mostly if: on steps or jobs). Most of the logic in your workflow will have to be in the steps.

lpzhang5:

where TAG_NAME is ‘staging’ if I push to develop branch and ‘prod’ if I push to master branch

You might have noticed this step in my example:

      - name: Generate container tag(s) and name
        run: |
          TAGS=$(python3 tag-from-ref.py ${{ github.ref }})
          echo "::set-env name=TAGS::${TAGS}"
          echo "::set-env name=CONTAINER_NAME::${{ gith…

Replies: 4 comments

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
0 replies
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
2 participants