Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCL Action syntax depecration #40

Open
ns-phennessy opened this issue Aug 17, 2019 · 5 comments

Comments

@ns-phennessy
Copy link

commented Aug 17, 2019

Via: https://developer.github.com/actions/

The documentation at https://developer.github.com/actions and support for the HCL syntax in GitHub Actions will be deprecated on September 30, 2019. Documentation for the new limited public beta using the YAML syntax is available on https://help.github.com. See "Automating your workflow with GitHub Actions" for documentation using the YAML syntax.

The official Terraform docs show examples using the HCL syntax. Github said they're deprecating this, but it did not work at all for me.

I was able to translate into the new syntax here and now it works! Here it is in all it's glory:
https://github.com/servers-tf/infrastructure/blob/master/.github/workflows/terraform.yml

Figured I would share this since I love automating my Git repos and am very excitied to have a easy integration with Terraform and Github :)

@dobber

This comment has been minimized.

Copy link

commented Aug 21, 2019

Thank you.
How would that work with multiple directories and workspaces?

@shawnmclean

This comment has been minimized.

Copy link

commented Aug 25, 2019

@ns-phennessy Your plan is failing about no configuration. Did you ever get around this? Mine is also failing there too.

Error: No configuration files

Plan requires configuration to be present. Planning without a configuration
would mark everything for destruction, which is normally not what is desired.
If you would like to destroy everything, run plan with the -destroy option.
Otherwise, create a Terraform configuration file (.tf file) and try again.
##[error]Docker run failed with exit code 1
@tomerliberman

This comment has been minimized.

Copy link

commented Aug 26, 2019

@shawnmclean
apparently you need to add a checkout step to your workflow

steps:
    - name: Checkout Repo
      uses: actions/checkout@v1

that seems to resolve the issue

@sudomateo

This comment has been minimized.

Copy link
Member

commented Sep 12, 2019

I'll leave this issue open as I work on updating this repository with the newer YAML GitHub Actions syntax. Glad you're unblocked.

@James-Quigley

This comment has been minimized.

Copy link

commented Sep 19, 2019

Using the github actions converter tool (https://github.com/actions/migrate) I was able to convert my workflow to the new syntax. FWIW mine now looks like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.