-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.17 KB
/
main.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
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