Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Convert Workflow from HCL to YAML #2

Merged
merged 3 commits into from Oct 1, 2019
Merged

Conversation

stefanzweifel
Copy link
Owner

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 August 12, 2019 10:01
@stefanzweifel
Copy link
Owner Author

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

@stefanzweifel stefanzweifel merged commit b53f47d into master Oct 1, 2019
@stefanzweifel stefanzweifel deleted the migrating-to-yaml-syntax branch October 1, 2019 18:45
@stefanzweifel
Copy link
Owner Author

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

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

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants