resistor-color: sync #268
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@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- 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 |