Skip to content

Reducing duplication for steps that run for PRs and master #25329

Discussion options

You must be logged in to vote

I figured it out. The correct syntax is:

if: ${{ github.ref == 'refs/heads/master' }}

Here is a complete example: https://github.com/stadtnavi/hsl-map-server/blob/6aadfc70df0f60ae4f68980ca546af788c6fb37c/.github/workflows/docker.yml

Replies: 7 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
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
3 participants