-
Notifications
You must be signed in to change notification settings - Fork 18
44 lines (38 loc) · 1.6 KB
/
operations.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Operations
on:
workflow_dispatch:
inputs:
job:
description: 'Job Name (activate/redrive)'
required: true
jobs:
activate:
name: Activate receipt rule set
if: ${{ github.event.inputs.job == 'activate' }}
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Activate receipt rule set based on branch name
run: aws ses set-active-receipt-rule-set --rule-set-name MailDog-${{ env.GITHUB_REF_SLUG_URL }}-ReceiptRuleSet
redrive:
name: Redrive DLQ Messages
if: ${{ github.event.inputs.job == 'redrive' }}
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Invoke Scheduler
run: aws lambda invoke --function-name $(aws lambda list-functions --query 'Functions[?starts_with(FunctionName, `MailDog-${{ env.GITHUB_REF_SLUG_URL }}-Scheduler`) == `true`].FunctionName' --output text) --output yaml response.yaml