File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : mirror-archive-on-merge-to-default-branch
2+
3+ on :
4+ push :
5+ # branches:
6+ # - master
7+
8+ jobs :
9+ mirror-archive :
10+ runs-on : ubuntu-latest
11+ env :
12+ BUCKET : attack-range-data
13+ ATTACK_DATA_ARCHIVE_FILE : attack_data.tar.zstd
14+ steps :
15+ - name : Checkout Repo
16+ uses : actions/checkout@v4
17+
18+ # - name: Setup AWS CLI and Credentials
19+ # uses: aws-actions/configure-aws-credentials@v4
20+ # with:
21+ # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
22+ # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23+ # aws-region: us-west-2
24+
25+ - name : Create archive of ONLY the datasets folder
26+ run : |
27+ # The structure of the tar + zstd archive should mirror that of checking out the repo directly
28+ mkdir attack_data
29+ mv datasets/ attack_data/.
30+
31+ # Compress with number of threads equal to number of CPU cores.
32+ # Compression level 10 is a great compromise of speed and file size.
33+ # File size reductions are diminishing returns after this - determined experimentally.
34+ time tar -c attack_data | zstd --compress -T0 -10 -o $ATTACK_DATA_ARCHIVE_FILE
35+ ls -lah attack_data.tar.zstd
36+
37+
38+ # - name: Upload Attack data archive file to S3 Bucket
39+ # run: |
40+ # aws s3 cp $ATTACK_DATA_ARCHIVE_FILE s3://$BUCKET/
41+ # aws s3api put-object-acl --bucket $BUCKET --key $ATTACK_DATA_ARCHIVE_FILE --acl public-read
42+
You can’t perform that action at this time.
0 commit comments