From e908848788f800ffd606e980da04a2a7f8c67337 Mon Sep 17 00:00:00 2001 From: Lakshmi Pillai Date: Wed, 9 Aug 2023 18:03:05 +0100 Subject: [PATCH] Add super-mode-calculatore.yaml --- .github/workflows/super-mode-calculator.yaml | 62 ++++++++++++++++++++ super-mode-calculator/riff-raff.yaml | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/super-mode-calculator.yaml diff --git a/.github/workflows/super-mode-calculator.yaml b/.github/workflows/super-mode-calculator.yaml new file mode 100644 index 0000000..9e1c497 --- /dev/null +++ b/.github/workflows/super-mode-calculator.yaml @@ -0,0 +1,62 @@ +name: Upload super-mode-calculator to riff raff +on: + pull_request: + branches: + - main + push: + branches: + - main +jobs: + build_super-mode-calculator: + if: github.repository_owner == 'guardian' + name: Build super-mode-calculator + runs-on: ubuntu-latest + permissions: + id-token: write # needed by actions-riff-raff + contents: read # needed because the repo is private + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Configure AWS credentials # needed by actions-riff-raff + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + aws-region: eu-west-1 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: './.nvmrc' + cache: 'yarn' + working-directory: ./super-mode-calculator + + - name: Yarn + run: | + yarn install + yarn lint + yarn run build + working-directory: ./super-mode-calculator + + - name: Copy files to Riff Raff package + run: cp package.json riff-raff.yaml target + working-directory: ./super-mode-calculator + + - name: Yarn install in package + run: yarn install --production + working-directory: ./super-mode-calculator/target + + - name: Zip target directory contents (quietly) + run: zip -qr super-mode-calculator.zip ./* + working-directory: ./super-mode-calculator/target + + - uses: guardian/actions-riff-raff@v2 + with: + projectName: Support:super-mode-calculator + configPath: ./super-mode-calculator/riff-raff.yaml + buildNumberOffset: 250 + contentDirectories: | + super-mode-calculator: + - ./super-mode-calculator/target/super-mode-calculator.zip + super-mode-calculator-cloudformation: + - ./super-mode-calculator/cfn.yaml diff --git a/super-mode-calculator/riff-raff.yaml b/super-mode-calculator/riff-raff.yaml index fa49faf..45aaa88 100644 --- a/super-mode-calculator/riff-raff.yaml +++ b/super-mode-calculator/riff-raff.yaml @@ -6,7 +6,7 @@ deployments: type: aws-lambda parameters: prefixStack: false - bucket: membership-dist + bucketSsmLookup: true fileName: super-mode-calculator.zip functionNames: - super-mode-calculator-partition-lambda-