Skip to content

Commit

Permalink
define workflows for all services
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLawes committed Aug 22, 2023
1 parent d16e690 commit 213c7b5
Show file tree
Hide file tree
Showing 8 changed files with 422 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/fake-breaking-news.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Fake breaking news lambda

on:
push:
branches:
- "**"
paths:
- fakebreakingnewslambda/**
- common/**
- api-models/**
- .github/workflows/fake-breaking-news.yml
pull_request:
workflow_dispatch:

# allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: corretto
cache: sbt
java-version: 11

- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}

- name: Compile, test and assembly
run: sbt compile test fakebreakingnewslambda/assembly

- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v2
with:
projectName: mobile-n10n:fakebreakingnewslambda
configPath: fakebreakingnewslambda/riff-raff.yaml
contentDirectories: |
fakebreakingnewslambda:
- fakebreakingnewslambda/target/scala-2.13/fakebreakingnewslambda.jar
fakebreakingnewslambda-cfn:
- fakebreakingnewslambda/fakebreakingnewslambda-cfn.yaml
52 changes: 52 additions & 0 deletions .github/workflows/football.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Football

on:
push:
branches:
- "**"
paths:
- football/**
- api-models/**
- .github/workflows/football.yml
pull_request:
workflow_dispatch:

# allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: corretto
cache: sbt
java-version: 11

- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}

- name: Compile, test and assembly
run: sbt compile test football/assembly

- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v2
with:
projectName: mobile-n10n:football
configPath: football/riff-raff.yaml
contentDirectories: |
football:
- football/target/scala-2.13/football.jar
mobile-notifications-football-cfn:
- football/cfn.yaml
53 changes: 53 additions & 0 deletions .github/workflows/notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Notification

on:
push:
branches:
- "**"
paths:
- notification/**
- common/**
- commonscheduleddynamodb/**
- .github/workflows/notification.yml
pull_request:
workflow_dispatch:

# allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: corretto
cache: sbt
java-version: 11

- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}

- name: Compile, test and assembly
run: sbt compile test notification/assembly

- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v2
with:
projectName: mobile-n10n:notification
configPath: notification/conf/riff-raff.yaml
contentDirectories: |
notification:
- notification/target/scala-2.13/notification.jar
notification-cfn:
- notification/conf/notification.yaml
54 changes: 54 additions & 0 deletions .github/workflows/registration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Registration

on:
push:
branches:
- "**"
paths:
- registration/**
- common/**
- commontest/**
- .github/workflows/registration.yml
pull_request:
workflow_dispatch:

# allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: corretto
cache: sbt
java-version: 11

- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}

- name: Compile, test and assembly
run: sbt compile test registration/assembly

- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v2
with:
projectName: mobile-n10n:registration
configPath: registration/conf/riff-raff.yaml
contentDirectories: |
registration:
- registration/target/scala-2.13/registration.jar
registration-cfn:
- cdk/cdk.out/Registration-CODE.template.json
- cdk/cdk.out/Registration-PROD.template.json
52 changes: 52 additions & 0 deletions .github/workflows/report-extractor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Report extractor

on:
push:
branches:
- "**"
paths:
- reportextractor/**
- common/**
- .github/workflows/report-extractor.yml
pull_request:
workflow_dispatch:

# allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: corretto
cache: sbt
java-version: 11

- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}

- name: Compile, test and assembly
run: sbt compile test reportextractor/assembly

- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v2
with:
projectName: mobile-n10n:reportextractor
configPath: reportextractor/riff-raff.yaml
contentDirectories: |
reportextractor:
- reportextractor/target/scala-2.13/reportextractor.jar
reportextractor-cfn:
- reportextractor/cfn.yaml
53 changes: 53 additions & 0 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Report

on:
push:
branches:
- "**"
paths:
- report/**
- common/**
- commontest/**
- .github/workflows/report.yml
pull_request:
workflow_dispatch:

# allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: corretto
cache: sbt
java-version: 11

- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}

- name: Compile, test and assembly
run: sbt compile test report/assembly

- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v2
with:
projectName: mobile-n10n:report
configPath: report/conf/riff-raff.yaml
contentDirectories: |
report:
- report/target/scala-2.13/report.jar
report-cfn:
- report/conf/report.yaml
52 changes: 52 additions & 0 deletions .github/workflows/schedule-lambda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Schedule lambda

on:
push:
branches:
- "**"
paths:
- schedulelambda/**
- commonscheduledynamodb/**
- .github/workflows/schedule-lambda.yml
pull_request:
workflow_dispatch:

# allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: corretto
cache: sbt
java-version: 11

- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}

- name: Compile, test and assembly
run: sbt compile test schedulelambda/assembly

- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v2
with:
projectName: mobile-n10n:schedulelambda
configPath: schedulelambda/riff-raff.yaml
contentDirectories: |
schedule:
- schedulelambda/target/scala-2.13/schedulelambda.jar
schedule-cfn:
- schedulelambda/cfn.yaml
Loading

0 comments on commit 213c7b5

Please sign in to comment.