Skip to content

ci

ci #66

Workflow file for this run

name: ci
'on':
workflow_dispatch:
schedule:
- cron: 02 7 * * *
jobs:
init:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prep submit_here
run: |
(
prints() { sed -e '$a\' "$@"; }
baseDir="./-data/lists"
edit_files=(exclude_for_all.txt exclude_for_mini_Lite_only.txt include_for_Pro_Xtra_only.txt include_for_all.txt)
for file in "${edit_files[@]}"; do
baseFile="$baseDir/$file"
tempFile="./submit_here/$file"
if [[ ! -f "$tempFile" ]]; then
touch "$tempFile"
else
if [ -s "$tempFile" ]; then
newBase=$(prints "$tempFile" "$baseFile")
prints <<<"$newBase" > "$baseFile"
rm -f "$tempFile" && touch "$tempFile"
fi
fi
done
)
shell: bash
- name: Commit & Push
uses: actions-js/push@master
with:
branch: master
message: merge! submit_here
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Initiate update
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.MY_PAT }}
repository: ${{ secrets.target_repo }}
event-type: update
client-payload: '{"success": true}'
- name: Delete workflow runs
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 0