kindergarten-garden: sync #260
Workflow file for this run
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
# Run tests for tcl or markdown files modified in this PR. | |
name: tcl / pr | |
on: pull_request | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install Deps | |
run: | | |
sudo apt-get update && sudo apt-get -y install tcl-thread | |
- name: Checkout PR | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b | |
- name: Run tests for changed/added exercises | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pr_endpoint=$(jq -r '"repos/\(.repository.full_name)/pulls/\(.pull_request.number)"' "$GITHUB_EVENT_PATH") | |
gh api "$pr_endpoint/files" --paginate --jq ' | |
.[] | | |
select(.status == "added" or .status == "modified") | | |
select(.filename | match("\\.(md|tcl|test)$")) | | |
.filename | |
' | xargs -r bash bin/pr |