Skip to content

update

update #150

Workflow file for this run

name: Checksum
on:
push:
branches: [ "master" ]
paths:
- 'EasyListHebrew.txt'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Validate existing checksum
id: validate_existing_checksum
continue-on-error: true
run: |
if ! python .github/scripts/validateChecksum.py EasyListHebrew.txt; then
echo "INVALID_CHECKSUM=true" >> $GITHUB_ENV
fi
- name: Run checksum update
if: ${{ env.INVALID_CHECKSUM == 'true' }}
continue-on-error: true
id: update_checksum
run: |
tmpList=$(mktemp)
python3 .github/scripts/addChecksum.py EasyListHebrew.txt $tmpList
python3 .github/scripts/validateChecksum.py $tmpList
if [ $? -eq 0 ]; then
mv -f $tmpList EasyListHebrew.txt
echo "OPEN_ISSUE=false" >> $GITHUB_ENV
else
echo "Checksum validation failed after update"
echo "OPEN_ISSUE=true" >> $GITHUB_ENV
fi
- name: Run genhosts
id: genhosts
run: python3 .github/scripts/genhosts.py EasyListHebrew.txt
- name: Update EasyListHebrew.txt file
if: ${{ env.OPEN_ISSUE == 'false' }}
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: Update Checksum
- name: Create Issue From File
if: ${{ env.OPEN_ISSUE == 'true' }}
uses: dacbd/create-issue-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Checksum failed please fix ASAP
assignees: EasyListHebrew, Hebrew-uBO-User
body: |
The checksum validation and update process failed in the GitHub Action workflow.
Please review `EasyListHebrew.txt` and ensure the checksum is correct.
[View Workflow Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})