-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (40 loc) · 1.37 KB
/
form-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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: Checkout repository
uses: actions/checkout@v2
- 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
- name: Check if new version is available
id: check-step
run: |
md5sum form.zip
md5sum form.zip > ./public/form.zip.md5
if ! git diff --exit-code ./public/form.zip.md5; then
echo "skipnext=true" >> $GITHUB_OUTPUT
else
echo "skipnext=false" >> $GITHUB_OUTPUT
fi
- name: Unzip form files
if : ( steps.check-step.outputs.skipnext != 'true' )
run: |
echo "will only run if skipnext is not true"
unzip form.zip -d ./public
ls -ls ./public