mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 02:19:23 +02:00
Yaml stub
This commit is contained in:
parent
bca311b8ca
commit
d52359d1c5
2 changed files with 10 additions and 30 deletions
37
.github/workflows/daily-csv-upload.yaml
vendored
37
.github/workflows/daily-csv-upload.yaml
vendored
|
@ -1,28 +1,17 @@
|
||||||
name: Upload current-full.csv and current-federal.csv
|
name: Upload current-full.csv and current-federal.csv
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
paths-ignore:
|
|
||||||
- 'docs/**'
|
|
||||||
- '**.md'
|
|
||||||
- '.gitignore'
|
|
||||||
branches:
|
|
||||||
- rjm
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- 'docs/**'
|
|
||||||
- '**.md'
|
|
||||||
- '.gitignore'
|
|
||||||
branches:
|
|
||||||
- rjm
|
|
||||||
schedule:
|
schedule:
|
||||||
# Runs every day at 5 AM UTC
|
# Runs every day at 5 AM UTC
|
||||||
- cron: '0 5 * * *'
|
- cron: '0 5 * * *'
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
upload_reports:
|
upload_reports:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'schedule'
|
env:
|
||||||
|
CF_USERNAME: CF_${{ github.event.inputs.environment }}_USERNAME
|
||||||
|
CF_PASSWORD: CF_${{ github.event.inputs.environment }}_PASSWORD
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
@ -31,19 +20,9 @@ jobs:
|
||||||
curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&source=github" | tar -zx
|
curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&source=github" | tar -zx
|
||||||
sudo mv cf /usr/local/bin
|
sudo mv cf /usr/local/bin
|
||||||
|
|
||||||
- name: Login to cloud.gov
|
- name: Generate current-federal.csv
|
||||||
run: |
|
run: cf run-task getgov-za "/tmp/lifecycle/shell -c './manage.py generate_current_full_report.py'"
|
||||||
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
|
- name: Generate current-full.csv
|
||||||
run: |
|
run: cf run-task getgov-za "/tmp/lifecycle/shell -c './manage.py generate_current_federal_report.py'"
|
||||||
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
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Internal API views"""
|
"""Internal API views"""
|
||||||
|
import os
|
||||||
from django.apps import apps
|
from django.apps import apps
|
||||||
from django.views.decorators.http import require_http_methods
|
from django.views.decorators.http import require_http_methods
|
||||||
from django.http import FileResponse, HttpResponse, JsonResponse
|
from django.http import FileResponse, HttpResponse, JsonResponse
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue