Skip to content

Evaluate expressions in with-configuration #25598

Answered by Yanjingzhu
elgohr asked this question in Actions
Discussion options

You must be logged in to vote

To evaluate expressions in with configuration, you need to put your expression inside {{ }} .

Please try this:

name: CI
on:
  push:
    branches:
      - master

  schedule:
    - cron: '*/5 * * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: actions/hello-world-docker-action@master
      with:
        who-to-greet: ${{ github.event_name != 'schedule' }}

You can refer to “About context and expressions” document:

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#about-context-and-expressions

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants