-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (31 loc) · 1.08 KB
/
github_backup.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
name: Mirror repository to S3
on:
push:
branches:
- master
jobs:
BackupRepoToS3:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@05b148adc31e091bafbaf404f745055d4d3bc9d2 # pin@v1
with:
aws-region: ap-southeast-2
role-to-assume: arn:aws:iam::817632051851:role/oidc-github-actions-mattrglobal-global
role-duration-seconds: 900
role-session-name: GithubActions
- name: Backing up this repo to AWS S3
uses: peter-evans/s3-backup@4f39c7dab63c7666d6ba6722d7966e7d0655583c # pin@v1
env:
AWS_REGION: ${{ env.AWS_REGION }}
ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
MIRROR_TARGET: mattrglobal-github-backup/http-signatures
SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }}
with:
args: --overwrite --remove