Skip to content
name: learn-github-actions
on: [push]
jobs:
run-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: php my-app.php
coding_standards:
runs-on: ubuntu-latest

Check failure on line 16 in .github/workflows/learn-github-actions.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/learn-github-actions.yml

Invalid workflow file

You have an error in your yaml syntax on line 16
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check if file begins with "//"
run: |
# Set the file path you want to check
FILE_PATH="my-app.php"
# Check if the file begins with "//"
if [[ "$(head -n 1 "$FILE_PATH")" == "//"* ]]; then
echo "File begins with '//'."
else
echo "File does not begin with '//'."
exit 1
fi