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
name: Checks for prompt eng challenge submission. | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
has-valid-submission: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if there are any changes in submissions dir | |
uses: dorny/[email protected] | |
id: changes | |
with: | |
filters: | | |
src: | |
- 'session_2/challenge/submissions/**' | |
list-files: "shell" | |
- name: Print changed files | |
run: | | |
echo '${{ toJSON(steps.changes.outputs) }}' | |
- if: ${{ (steps.changes.outputs.src_count > 1) }} | |
uses: actions/github-script@v7 | |
with: | |
script: core.setFailed('More than one submissions are not allowed at once.') | |
- uses: gacts/[email protected] | |
id: check-star | |
- if: ${{ (steps.changes.outputs.src == 'true') && (steps.check-star.outputs.is-stargazer != 'true') }} | |
uses: actions/github-script@v7 | |
with: | |
script: core.setFailed('⭐ Please, star this repository!') |