Migrating GitHub Actions from HCL syntax to YAML syntax

You can automatically migrate your workflow files from HCL to YAML syntax.

GitHub Actions is currently in limited public beta and is subject to change. We strongly recommend that you do not use this feature for high-value workflows and content during the beta period.

For more information, see "About GitHub Actions."

In this article

About the new YAML syntax for GitHub Actions

GitHub Actions now uses YAML syntax in workflow files. Support for the HCL syntax in GitHub Actions will be deprecated on September 30, 2019. To continue using workflows that you created with the HCL syntax, you'll need to migrate the workflow files to the new YAML syntax using the migration script.

For more information about the YAML syntax and other changes to GitHub Actions, see "Workflow syntax for GitHub Actions" and "About GitHub Actions."


Before you can test your new workflow files, you must successfully join the new limited public beta for the YAML syntax by signing up on the GitHub Actions page.

Converting workflow files in your repository to YAML syntax

You can migrate your workflow files by using a migration script made for your operating system. This script converts workflow files in your repository to the new YAML syntax.

  1. Navigate to the GitHub Actions migrations repository.

  2. Under your repository name, click Releases.

    Releases tab

  3. On the Releases tab, find the latest release of the migration script.

    Choose latest script release

  4. Under Assets, to download the file for your operating system, click the file name. The following example is for the Linux operating system.

    Click link for your OS script

  5. Unzip or untar the migrate-actions file.

  6. Open Terminal.

  7. Change the current working directory to your local repository.

  8. Create and check out a new branch.

    $ git checkout -b migrating-to-yaml-syntax
  9. Run the migration script. For example, type the following in a terminal window on a Linux operating system:

    $ path/to/file/migrate-actions-linux

    Note: You may need to use sudo path/to/file/migrate-actions to run the script.

  10. After you've successfully migrated, commit your new files. You can also delete your old main.workflow file.

    Successful migration

  11. Merge your branch into the repository's default branch.

Getting support

If you encounter any problems with your migration, please open an issue in the GitHub Actions migration repository.

Further reading

Ask a human

Can't find what you're looking for?

Contact us