.github/workflows/update-ipa-elasticsearch.yaml #660
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
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 }} |