Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 93f5f41

Browse files
feat: adding github actions to backup repository to s3 (#188)
1 parent 84a242c commit 93f5f41

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/github_backup.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Mirror repository to S3
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
BackupRepoToS3:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Configure aws credentials
17+
uses: aws-actions/configure-aws-credentials@v1
18+
with:
19+
aws-region: ap-southeast-2
20+
role-to-assume: arn:aws:iam::817632051851:role/oidc-github-actions-mattrglobal-global
21+
role-duration-seconds: 900
22+
role-session-name: GithubActions
23+
24+
- name: Backing up this repo to AWS S3
25+
uses: peter-evans/s3-backup@v1
26+
env:
27+
AWS_REGION: ${{ env.AWS_REGION }}
28+
ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
29+
MIRROR_TARGET: mattrglobal-github-backup/node-bbs-signatures
30+
SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
31+
AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }}
32+
with:
33+
args: --overwrite --remove

0 commit comments

Comments
 (0)