mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +02:00
Scripts to generate the file and api update to grab what exists
This commit is contained in:
parent
e52954f984
commit
bca311b8ca
6 changed files with 145 additions and 35 deletions
49
.github/workflows/daily-csv-upload.yaml
vendored
Normal file
49
.github/workflows/daily-csv-upload.yaml
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
name: Upload current-full.csv and current-federal.csv
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**.md'
|
||||
- '.gitignore'
|
||||
branches:
|
||||
- rjm
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**.md'
|
||||
- '.gitignore'
|
||||
branches:
|
||||
- rjm
|
||||
schedule:
|
||||
# Runs every day at 5 AM UTC
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
upload_reports:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'schedule'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install CF CLI
|
||||
run: |
|
||||
curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&source=github" | tar -zx
|
||||
sudo mv cf /usr/local/bin
|
||||
|
||||
- name: Login to cloud.gov
|
||||
run: |
|
||||
cf api https://api.fr.cloud.gov
|
||||
cf auth ${{ secrets.CF_USERNAME }} ${{ secrets.CF_PASSWORD }}
|
||||
cf target -o ${{ secrets.CF_ORG }} -s ${{ secrets.CF_SPACE }}
|
||||
|
||||
- name: Run task
|
||||
run: cf run-task my-app "/tmp/lifecycle/shell -c './manage.py generate_current_full_and_federal_reports.py'"
|
||||
|
||||
- name: Commit and push CSV files
|
||||
run: |
|
||||
git config --global user.name 'GitHub Actions'
|
||||
git config --global user.email 'actions@github.com'
|
||||
git add current-full.csv current-federal.csv
|
||||
git commit -m "Update CSV files"
|
||||
git push
|
Loading…
Add table
Add a link
Reference in a new issue