Update Super mode query for epic views #68
Workflow file for this run
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: Build super-mode and upload to riff raff | |
on: | |
pull_request: | |
branches: | |
- "**" | |
push: | |
branches: | |
- main | |
jobs: | |
super-mode-build: | |
if: >- | |
(github.event.pull_request.head.repo.owner.login == 'guardian' || | |
github.event_name == 'push') | |
name: | |
super mode build | |
# These permissions are required by guardian/actions-riff-raff | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Env | |
run: env | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
cache-dependency-path: ./super-mode-calculator/yarn.lock | |
node-version-file: "super-mode-calculator/.nvmrc" | |
- name: Yarn install, lint, build | |
working-directory: ./super-mode-calculator | |
run: | | |
yarn install | |
yarn lint | |
yarn run build | |
- name: Copy files to Riff Raff package | |
working-directory: ./super-mode-calculator | |
run: | | |
cp package.json target | |
pushd target | |
yarn install --production | |
zip -r super-mode ./* | |
popd | |
- name: Build cdk | |
working-directory: ./cdk | |
run: | | |
yarn install | |
yarn lint | |
yarn test | |
yarn synth | |
- name: super-mode riff-raff | |
uses: guardian/actions-riff-raff@v4 | |
with: | |
app: super-mode | |
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
config: | | |
stacks: | |
- support | |
regions: | |
- eu-west-1 | |
allowedStages: | |
- CODE | |
- PROD | |
deployments: | |
super-mode-cloudformation: | |
type: cloud-formation | |
app: super-mode | |
parameters: | |
cloudFormationStackName: super-mode | |
templateStagePaths: | |
CODE: SuperModeCalculator-CODE.template.json | |
PROD: SuperModeCalculator-PROD.template.json | |
cloudFormationStackByTags: false | |
prependStackToCloudFormationStackName: true | |
super-mode: | |
type: aws-lambda | |
parameters: | |
prefixStack: false | |
fileName: super-mode.zip | |
functionNames: | |
- super-mode- | |
contentDirectories: | | |
super-mode-cloudformation: | |
- cdk/cdk.out/SuperModeCalculator-CODE.template.json | |
- cdk/cdk.out/SuperModeCalculator-PROD.template.json | |
super-mode: | |
- super-mode-calculator/target/super-mode.zip |