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

Convert Workflow from HCL to YAML #2

Merged
merged 3 commits into from Oct 1, 2019
Merged

Conversation

@stefanzweifel
Copy link
Owner

@stefanzweifel stefanzweifel commented Aug 12, 2019

Attempt to Migrate the existing HCL Workflow to the YAML format.
https://help.github.com/en/articles/migrating-github-actions-from-hcl-syntax-to-yaml-syntax

@stefanzweifel stefanzweifel marked this pull request as ready for review Aug 12, 2019
@stefanzweifel
Copy link
Owner Author

@stefanzweifel stefanzweifel commented Aug 12, 2019

Look like I'm not yet in the new YAML beta 🤷‍♂

@stefanzweifel stefanzweifel merged commit b53f47d into master Oct 1, 2019
3 checks passed
@stefanzweifel stefanzweifel deleted the migrating-to-yaml-syntax branch Oct 1, 2019
@stefanzweifel
Copy link
Owner Author

@stefanzweifel stefanzweifel commented Oct 1, 2019

The old HCL-workflow has been deleted.

I've decided to split the existing workflow into separate files, for easier maintenance. There are now the following workflows:

  • test: Run the PHPUnit Testsuite on each push
  • insights: Run PHP Insights on each push and display the results in the Action's log
  • format_php: Run PHP CS Fixer on each push within a Pull Request. If changes have been made, push those changes back to the repository.

@TomasVotruba
Copy link

@TomasVotruba TomasVotruba commented Jan 7, 2020

Thanks for a great post Stefan. It gave me quick insight into the topic, really well written 👍

commit_message: Apply php-cs-fixer changes
branch: ${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this really work?
It looks amazing

Copy link
Owner Author

@stefanzweifel stefanzweifel Jan 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this does work :)

We use this or a very similar workflow in a lot of projects at my current job.
It seems I haven't made an example of actually running the workflow in a PR in this repository.

You can find a working example/demo in the demo project I use for the mentioned GitHub Action here: stefanzweifel/git-auto-commit-action-demo-app#4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, I gotta try it now :) so futuristic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants