Skip to content

Create GHA extract shell scripts action #13

Create GHA extract shell scripts action

Create GHA extract shell scripts action #13

---
name: Integration Tests
on:
pull_request:
paths:
- "action.yaml"
- "gha_extract_shell_scripts.py"
- ".github/workflows/integration-tests.yaml"
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: ./
id: gha-extract-shell-scripts
- name: Test extracted
run: |
set -x
output_file="workflow_scripts/${{ env.workflow_file }}/job=Test/step=Test_extracted.sh"
if [[ ! -f "$output_file" ]]; then
find .
exit 1
fi
diff "$output_file" <(echo "$expected")
env:
expected: |
#!/usr/bin/bash
set -e
# ---
output_file="workflow_scripts/:env.workflow_file:/job=Test/step=Test_extracted.sh"
if [[ ! -f "$output_file" ]]; then
find .
exit 1
fi
diff "$output_file" <(echo "$expected")
workflow_file: integration-tests.yaml