1# This workflow updates the list of deleted files based on the recent changes and creates a pull request. 2# It compares the current master with the stable branch and adds all deleted files to the data/deleted.files file 3# unless they are already listed there or are excluded from the release archives (export-ignore in .gitattributes). 4 5name: "Update deleted files" 6on: 7 push: 8 branches: 9 - master 10 11jobs: 12 update: 13 name: Update deleted files 14 runs-on: ubuntu-latest 15 steps: 16 - name: Checkout 17 uses: actions/checkout@v3 18 with: 19 fetch-depth: 0 20 21 - name: Update deleted files 22 run: | 23 for F in $(git diff origin/stable..HEAD --summary | awk '/^ delete/ && $4 !~ /^(VERSION)/ {print $4}'); do 24 if grep -q "^$F export-ignore" .gitattributes; then 25 continue 26 fi 27 if grep -q "^$F" data/deleted.files; then 28 continue 29 fi 30 echo "$F" >> data/deleted.files 31 done 32 33 - name: Create Pull Request 34 uses: peter-evans/create-pull-request@v4 35 with: 36 commit-message: " Update deleted files" 37 title: " Update deleted files" 38 body: "This updates the list of deleted files based on the recent changes." 39 delete-branch: true 40 branch: "bot/deletedFiles" 41