mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +02:00
Set default
This commit is contained in:
parent
99c2dc4de3
commit
20005b7140
1 changed files with 3 additions and 13 deletions
16
.github/workflows/daily-csv-upload.yaml
vendored
16
.github/workflows/daily-csv-upload.yaml
vendored
|
@ -3,24 +3,12 @@ run-name: Upload current-full.csv and current-federal.csv for branch ${{ github.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
environment:
|
|
||||||
type: choice
|
|
||||||
description: Which environment do you wish to load reports for?
|
|
||||||
options:
|
|
||||||
- stable
|
|
||||||
- staging
|
|
||||||
- development
|
|
||||||
- za
|
|
||||||
schedule:
|
schedule:
|
||||||
# Runs every day at 5 AM UTC.
|
# Runs every day at 5 AM UTC.
|
||||||
- cron: "0 5 * * *"
|
- cron: "0 5 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
variables:
|
variables:
|
||||||
env:
|
|
||||||
DEFAULT_ENV: CF_REPORT_ENV
|
|
||||||
outputs:
|
outputs:
|
||||||
environment: ${{ steps.var.outputs.environment}}
|
environment: ${{ steps.var.outputs.environment}}
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
|
@ -30,7 +18,8 @@ jobs:
|
||||||
id: var
|
id: var
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const environment = (github && github.event && github.event.inputs) ? github.event.inputs.environment : ${{ secrets[env.DEFAULT_ENV] }};
|
const default = "CF_REPORT_ENV"
|
||||||
|
const environment = ${{ secrets[default] }};
|
||||||
core.setOutput('environment', environment);
|
core.setOutput('environment', environment);
|
||||||
|
|
||||||
upload-reports:
|
upload-reports:
|
||||||
|
@ -39,6 +28,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CF_USERNAME: CF_${{ needs.variables.outputs.environment }}_USERNAME
|
CF_USERNAME: CF_${{ needs.variables.outputs.environment }}_USERNAME
|
||||||
CF_PASSWORD: CF_${{ needs.variables.outputs.environment }}_PASSWORD
|
CF_PASSWORD: CF_${{ needs.variables.outputs.environment }}_PASSWORD
|
||||||
|
CF_DEFAULT_ENV: CF_REPORT_ENV
|
||||||
steps:
|
steps:
|
||||||
- name: Generate current-federal.csv
|
- name: Generate current-federal.csv
|
||||||
uses: cloud-gov/cg-cli-tools@main
|
uses: cloud-gov/cg-cli-tools@main
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue