update: 更新软件工程、计算机网络、操作系统、并行计算、网络信息 (#18) #93
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: Check for File Duplicates | |
on: | |
push: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
check_duplicates: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Check for Duplicate Files | |
id: check_duplicates | |
run: | | |
chmod +x ./check_duplicates.py | |
python ./check_duplicates.py | |
- name: Set Action Result | |
if: steps.check_duplicates.outputs.has_duplicates == 'true' | |
run: echo "Duplicate files found. The push is invalid." | |
env: | |
ACTION_RESULT: invalid | |
- name: Set Output | |
id: action_result | |
if: env.ACTION_RESULT != '' | |
run: echo "::set-output name=result::$ACTION_RESULT" |