cowsay utility in a dedicated GitHub Actions workflow. Isolating this process into its own workflow file keeps your CI/CD pipelines clean and easy to maintain.
1. Create the Workflow File
Under.github/workflows/, create generate-ascii.yaml and add:
Summary of Steps
| Step | Purpose |
|---|---|
| Checkout Repository | Retrieves your code so later steps can access files |
| Install cowsay | Installs the cowsay utility on the Ubuntu runner |
| Generate ASCII Art | Creates dragon ASCII art and appends it to dragon.txt |
| Verify Output | Confirms the word “dragon” exists in the text file |
| Display Artwork | Prints the ASCII art to the console |
| List Workspace Files | Ensures dragon.txt is present in the runner directory |
2. Trigger the Workflow
Commit and push the new workflow to your repository:push event and run all workflows configured for it—including your new ASCII art generator.
3. View and Inspect Runs
Navigate to the Actions tab in your GitHub repository to see the status of each workflow:
Successful Run Logs
Files created during a workflow run (e.g.,
dragon.txt) exist only on the runner VM. They are removed once the job completes and do not persist in your repository.4. Disable an Outdated Workflow
If you have multiple workflows listening onpush and want to prevent an old one from running:
- Open the Actions tab and select the workflow to disable.
- Click Disable workflow in the sidebar.
Disabling a workflow stops all future runs for that configuration. Ensure you’re disabling the correct workflow.