forked from FusionAuth/fusionauth-site
-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (41 loc) · 1.15 KB
/
publish-redirect-rules.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
45
46
47
48
49
---
name: publish-redirect-rules
env:
AWS_REGION: us-east-1
on:
push:
branches:
- master
paths:
- 'src/redirects.json'
pull_request:
branches:
- master
paths:
- 'src/redirects.json'
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: fusionauth-standard
container: 752443094709.dkr.ecr.us-west-2.amazonaws.com/gha-runner-ubuntu-22.04:latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
sparse-checkout: src/redirects.json
- name: validate json
run: cat src/redirects.json | jq empty
- name: set aws credentials
if: github.event_name == 'push'
uses: aws-actions/configure-aws-credentials@v4
with:
role-chaining: true
role-to-assume: ${{ secrets.ACTIONS_RUNNER_ROLE_PROD }}
role-session-name: github-actions
aws-region: ${{ env.AWS_REGION }}
- name: upload file to s3
if: github.event_name == 'push'
run: aws s3 cp src/redirects.json s3://${{ secrets.S3_ARTIFACTS_PROD }}/lambda/site-origin-request-handler/redirects.json