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
- Converting workflow files in your repository to YAML syntax
- Getting support
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.
Navigate to the GitHub Actions migrations repository.
Under your repository name, click Releases.
On the Releases tab, find the latest release of the migration script.
Under Assets, to download the file for your operating system, click the file name. The following example is for the Linux operating system.
Unzip or untar the migrate-actions file.
Change the current working directory to your local repository.
Create and check out a new branch.
$ git checkout -b migrating-to-yaml-syntax
Run the migration script. For example, type the following in a terminal window on a Linux operating system:
Note: You may need to use
sudo path/to/file/migrate-actionsto run the script.
After you've successfully migrated, commit your new files. You can also delete your old
Merge your branch into the repository's default branch.
If you encounter any problems with your migration, please open an issue in the GitHub Actions migration repository.