Support - Generate Knapsack JSON #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Support - Generate Knapsack JSON" | |
on: | |
workflow_dispatch: | |
schedule: | |
# At 01:00 on day-of-month 1. https://crontab.guru/#0_1_1_*_* | |
- cron: '0 1 1 * *' | |
jobs: | |
generate_json: | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_HOST_AUTH_METHOD: trust | |
ports: | |
- 5432:5432 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
chrome: | |
image: selenium/standalone-chrome:95.0-chromedriver-95.0 | |
ports: | |
- 4444:4444 | |
steps: | |
- uses: actions/[email protected] | |
- name: Generate JSON | |
run: | | |
docker run --rm \ | |
--network ${{ job.container.network }} \ | |
-e RAILS_ENV=test \ | |
-e DATABASE_URL=postgres://postgres:password@postgres:5432/buy-for-your-school-test \ | |
-e DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL="true" \ | |
-e DOCKER=true \ | |
-e SELENIUM_HUB_URL=http://chrome:4444/wd/hub \ | |
-e REDIS_URL=redis://redis:6379 \ | |
-e APPLICATION_URL=http://localhost:3000 \ | |
-e SECRET_KEY_BASE=test \ | |
-e CONTENTFUL_SPACE=test \ | |
-e CONTENTFUL_ENVIRONMENT=master \ | |
-e CONTENTFUL_DELIVERY_TOKEN=123 \ | |
-e CONTENTFUL_PREVIEW_TOKEN=123 \ | |
-e CONTENTFUL_ENTRY_CACHING=false \ | |
-e CONTENTFUL_WEBHOOK_API_KEY=test \ | |
-e NOTIFY_API_KEY=development_team-12345678-1234-1234-1234-abcd12345678-12345678-1234-1234-1234-abcd12345678 \ | |
-e MS_GRAPH_TENANT=test \ | |
-e MS_GRAPH_CLIENT_ID=test \ | |
-e MS_GRAPH_CLIENT_SECRET=test \ | |
-e MS_GRAPH_SHARED_MAILBOX_USER_ID=test \ | |
-e MS_GRAPH_SHARED_MAILBOX_NAME=mailbox \ | |
-e [email protected] \ | |
-e CLAMAV_REST_SERVICE_URL=test \ | |
-e DSI_ENV=test \ | |
-e DFE_SIGN_IN_IDENTIFIER=service \ | |
-e DFE_SIGN_IN_API_SECRET=secret \ | |
-e PROC_OPS_TEAM=test \ | |
-e QUALTRICS_SURVEY_URL=https://dferesearch.fra1.qualtrics.com \ | |
-e [email protected] \ | |
-e KNAPSACK_GENERATE_REPORT=true \ | |
-v ${PWD}:/srv/app \ | |
ghcr.io/dfe-digital/buy-for-your-school:latest-test \ | |
bash -c "bundle exec rspec || :" | |
- name: Create Pull Request | |
uses: peter-evans/[email protected] | |
with: | |
branch: update-knapsack | |
base: main | |
delete-branch: true | |
title: 'Support: Updated knapsack config' | |
commit-message: 'Updated knapsack config' | |
add-paths: | | |
knapsack_rspec_report.json |