-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
support running inline php scripts #482
Comments
@staabm It saves whatever is in the Relevant ADR: https://github.com/actions/runner/blob/main/docs/adrs/0277-run-action-shell-options.md - name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- name: Run inline PHP code
shell: php {0}
run: |
<?php
$welcome = "Hello, world";
echo $welcome; |
thanks for the great reply @shivammathur. wasn't aware it is already that easy <3 |
Do you think this is worth mentioning in the readme? |
@staabm I will add it in the next release. |
Added to README in |
thank you so much. already used it today and it is a pleasure to write gh-action workflows in php instead of bash. |
Describe the feature
writing bash scripts etc. within github action workflows is a real pain - especially if you are used to the php language.
additionally the feedback loop getsss soo long when try and error debugging github action workflows.
I would love if there would be something possible like:
so writing inline php within the workflow.
that way we could easily develop advanced logic without the need for advanced bash fu.
Version
v2
.Underlying issue
the long feedback look of github actions
Describe alternatives
in our use-case we cannot move the logic into a separat php file and run it with
php -f file.php
, since we need a self-containing workflow file (this is easier to distribute and keep in sync between github projects)Additional context
n/a
Are you willing to submit a PR?
I don't think I can implement it myself
The text was updated successfully, but these errors were encountered: