Flat Scrapping DODF (Daily Edition) #100
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: Flat Scrapping DODF (Daily Edition) | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '30 6,18 * * 1-5' | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
# This step build variable "DateRef" to assign URL and FILENAME source! | |
- name: Build DateRef | |
id: builddate # this is used on variable path | |
run: | | |
DateRef=$(date +'%Y%m%d') | |
echo "dateref=$DateRef" >> $GITHUB_OUTPUT | |
# This step installs Deno, which is a new Javascript runtime that improves on Node. Can be used for an optional postprocessing step | |
- name: Setup deno | |
uses: denoland/setup-deno@main | |
with: | |
deno-version: v1.10.x | |
# Check out the repository so it can read the files inside of it and do other operations | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
# The Flat Action step. We fetch the data in the http_url and save it as downloaded_filename | |
- name: Fetch data | |
uses: githubocto/[email protected] | |
with: | |
http_url: https://www.dodf.df.gov.br/index/jornal-json | |
downloaded_filename: data/dodf_${{ steps.builddate.outputs.dateref }}.json | |