Skip to content

CheckForChanges

CheckForChanges #3

name: CheckForChanges
on:
schedule:
- cron: "45 11 * * *"
jobs:
checkForChanges:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20.x"
- name: Scrape markets
run: |
cd ./scraper
npm install
npm run leipzigde
git diff markets_leipzig_de.json | echo >> git_diff.txt
export HAS_CHANGES = [ -s git_diff.txt ] && TRUE
- name: Upload Weihnachtsmärkte
if: ${{ HAS_CHANGES }}

Check failure on line 24 in .github/workflows/check_for_changes.yml

View workflow run for this annotation

GitHub Actions / CheckForChanges

Invalid workflow file

The workflow is not valid. .github/workflows/check_for_changes.yml (Line: 24, Col: 13): Unrecognized named-value: 'HAS_CHANGES'. Located at position 1 within expression: HAS_CHANGES .github/workflows/check_for_changes.yml (Line: 31, Col: 13): Unrecognized named-value: 'HAS_CHANGES'. Located at position 1 within expression: HAS_CHANGES

Check failure on line 24 in .github/workflows/check_for_changes.yml

View workflow run for this annotation

GitHub Actions / CheckForChanges

Invalid workflow file

The workflow is not valid. .github/workflows/check_for_changes.yml (Line: 24, Col: 13): Unrecognized named-value: 'HAS_CHANGES'. Located at position 1 within expression: HAS_CHANGES .github/workflows/check_for_changes.yml (Line: 31, Col: 13): Unrecognized named-value: 'HAS_CHANGES'. Located at position 1 within expression: HAS_CHANGES

Check failure on line 24 in .github/workflows/check_for_changes.yml

View workflow run for this annotation

GitHub Actions / CheckForChanges

Invalid workflow file

The workflow is not valid. .github/workflows/check_for_changes.yml (Line: 24, Col: 13): Unrecognized named-value: 'HAS_CHANGES'. Located at position 1 within expression: HAS_CHANGES .github/workflows/check_for_changes.yml (Line: 31, Col: 13): Unrecognized named-value: 'HAS_CHANGES'. Located at position 1 within expression: HAS_CHANGES
uses: actions/upload-artifact@v3
with:
name: weihnachts_maerkte_leipzigde.json
path: markets_leipzig_de.json
retention-days: 1
- name: Upload Diff
if: ${{ HAS_CHANGES }}
uses: actions/upload-artifact@v3
with:
name: git_diff.txt
path: git.diff
retention-days: 1
- name: FailOnChanges
if: ${{ HAS_CHANGES }}
run: exit 1