Table of Contents
1. Create the Shell Script
In your repository root, add a file namedascii-script.sh:
Make sure your script uses a Unix-style line ending (
LF) and the correct shebang (#!/bin/sh).2. Example: Workflow Fails Due to Permissions
A minimal workflow that invokes the script directly will fail because the checked-out file isn’t executable by default:Without executable permissions, the runner cannot invoke your script. Always ensure your scripts are marked as executable before running.
3. Grant Execute Permissions in Workflow
Update the workflow to add achmod +x step before executing:
4. Verify the Workflow Run
- Go to the Actions tab and select your latest workflow.
-
In List Files Before Run, notice
ascii-script.shis still-rw-r--r--: -
The Make Script Executable and Run step applies
chmod +xand executes the script. You’ll see: -
Finally, the script’s
ls -ltrashows both the executable script and generateddragon.txt: