.github/workflows/daily-cross-app-import-report.yml
name: Cross App Import Report
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 1-5'
jobs:
generate-report:
name: Generate and upload report
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017
- name: Install dependencies
uses: ./.github/workflows/install
timeout-minutes: 30
with:
key: ${{ hashFiles('yarn.lock') }}
yarn_cache_folder: .cache/yarn
path: |
.cache/yarn
node_modules
- name: Generate report
run: yarn check-app-imports
- name: Configure AWS credentials (1)
uses: ./.github/workflows/configure-aws-credentials
with:
aws_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: us-gov-west-1
- name: Get AWS IAM role
uses: ./.github/workflows/inject-secrets
with:
ssm_parameter: /frontend-team/github-actions/parameters/AWS_FRONTEND_NONPROD_ROLE
env_variable_name: AWS_FRONTEND_NONPROD_ROLE
- name: Configure AWS Credentials (2)
uses: ./.github/workflows/configure-aws-credentials
with:
aws_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: us-gov-west-1
role: ${{ env.AWS_FRONTEND_NONPROD_ROLE }}
role_duration: 900
session_name: vsp-frontendteam-githubaction
- name: Upload report to S3
run: aws s3 cp tmp/cross-app-imports.json s3://vetsgov-website-builds-s3-upload-test/cross-app-imports/cross-app-imports.json --acl public-read --region us-gov-west-1