File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Backup Rasa repo to S3
2
+ on :
3
+ schedule :
4
+ # Run cron job at 7AM Monday to Sunday.
5
+ - cron : " 0 7 * * *"
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ id-token : write
10
+ contents : read
11
+
12
+ jobs :
13
+ backup :
14
+ runs-on : ubuntu-22.04
15
+ steps :
16
+ - name : Checkout repository
17
+ uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
18
+ with :
19
+ fetch-depth : 0
20
+
21
+ - name : Configure AWS credentials
22
+ uses : aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 # v3.0.1
23
+ with :
24
+ role-to-assume : ${{ secrets.GIT_BACKUP_ROLE_ARN }}
25
+ aws-region : ${{ secrets.GIT_BACKUP_REGION }}
26
+
27
+ # Determine the date in the right format for us to tag the image.
28
+ - name : Get current date
29
+ id : date
30
+ run : echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
31
+
32
+ - name : Create Git bundle
33
+ run : git bundle create --progress rasa-${{ steps.date.outputs.date }}.bundle --all
34
+
35
+ - name : Verify Git bundle
36
+ run : git bundle verify rasa-${{ steps.date.outputs.date }}.bundle
37
+
38
+ - name : Upload bundle to S3
39
+ run : aws s3 cp rasa-${{ steps.date.outputs.date }}.bundle s3://${{ secrets.GIT_BACKUP_BUCKET }}/rasa/
You can’t perform that action at this time.
0 commit comments