This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
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 |