add form download script #3
Workflow file for this run
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: Quality Assurance | |
on: | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: '0 0 * * *' # This cron expression runs the workflow every day at midnight UTC | |
env: | |
CURRENT_FORM_VERSION: "DPFOBv23" | |
jobs: | |
download: | |
name: Download Form File | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download config file | |
run: wget https://edane.financnasprava.sk/java/prod/eform/config.xml -O config.xml | |
- name: Filter only for Danove Priznanie Files | |
run: | | |
grep -i "DPFO" config.xml | grep "ElektronickyFormular" > dp.out | |
cat dp.out | |
ZIP_URL=$(grep -i $CURRENT_FORM_VERSION dp.out | sed -n 's/.*Url="\([^"]*\)".*/\1/p') | |
echo $ZIP_URL | |
wget $ZIP_URL -O form.zip | |