Skip to content

.github/workflows/update-ipa-elasticsearch.yaml #526

.github/workflows/update-ipa-elasticsearch.yaml

.github/workflows/update-ipa-elasticsearch.yaml #526

on:
workflow_dispatch:
schedule:
- cron: '0 15 * * *'
jobs:
# NOTE: this is the importer from the legacy publiccode-crawler,
# which always made the ElasticSearch index unavailable for
# the duration of the import - and so does this action.
update-indicepa-pec-elasticsearch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.18.x
- run: >
cd ipa-to-elasticsearch &&
curl -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" -vL 'https://www.indicepa.gov.it/public-services/opendata-read-service.php?dstype=FS&filename=pec.txt' -o pec.txt &&
head pec.txt &&
go run main.go
env:
ELASTIC_USER: elastic
ELASTIC_PWD: ${{ secrets.ELASTIC_PWD }}