GitHub Actions – new workflow syntax features

The GitHub Actions workflow syntax has new features based on feedback from our community.

Env at the workflow and job level

It is common to need define a set of environment variables that are used in multiple steps in a job and even multiple jobs in a workflow. Now you can add an `env` map at both the workflow and job level. Those environment variables will be merged with the `env` defined at any step lower in the hierarchy.

If at the job level

Many of you have commented that you would like to have jobs that run only under certain conditions just like you can with steps. Now you can define an if as part of a job using the same expressions you can with a step.

    if: github.event_name == 'pull_request'
    - run: echo "Hello in a PR"

Learn more about GitHub Actions workflow syntax

Join us at GitHub Universe

Our largest product and community conference is returning to the Palace of Fine Arts in San Francisco, November 13-14. Hear what's next for the GitHub platform, find inspiration for your next project, and connect with developers who are changing the world.

Get tickets

GitHub Actions now supports CI/CD

GitHub Actions makes it easier to automate how you build, test, and deploy your projects on any platform, including Linux, macOS, and Windows. Try out the beta before GitHub Actions is generally available on November 13.

Sign up for the beta