File tree Expand file tree Collapse file tree 5 files changed +60
-1
lines changed Expand file tree Collapse file tree 5 files changed +60
-1
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ branches :
4
+ - main
5
+
6
+ jobs :
7
+ use_s3cmd :
8
+ runs-on : ubuntu-latest
9
+
10
+ name : Use S3cmd for digitalocean
11
+ steps :
12
+ - name : Set up S3cmd cli tool
13
+ uses : s3-actions/s3cmd@main
14
+ with :
15
+ provider : digitalocean
16
+ region : ' NYC3'
17
+ access_key : ${{ secrets.SPACES_ACCESS_KEY_ID }}
18
+ secret_key : ${{ secrets.SPACES_SECRET_ACCESS_KEY }}
19
+
20
+ - name : Interact with object storage
21
+ run : |
22
+ buck="github-action-${{ github.run_id }}"
23
+ mkdir example
24
+ s3cmd mb s3://$buck
25
+ echo 'foo' >> example/bar
26
+ s3cmd put example/bar s3://$buck
27
+ mkdir -p example/baz/bar
28
+ echo 'fizz' >> example/baz/bar/faz
29
+ sleep 10
30
+ s3cmd sync --recursive --acl-public example s3://$buck
31
+ sleep 10
32
+ s3cmd rm -r --force s3://$buck
33
+ sleep 10
34
+ s3cmd rb s3://$buck
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ inputs:
17
17
required : true
18
18
runs :
19
19
using : ' node12'
20
- main : ' dist/index.js'
20
+ main : ' dist/index.js'
Original file line number Diff line number Diff line change @@ -445,6 +445,14 @@ const providers = {
445
445
access_key,
446
446
secret_key,
447
447
} ) ,
448
+ digitalocean : ( { region = 'nyc3' , access_key = '' , secret_key = '' } ) => ( {
449
+ bucket_location : region ,
450
+ host_base : `${ region } .digitaloceanspaces.com` ,
451
+ host_bucket : `%(bucket)s.${ region } .digitaloceanspaces.com` ,
452
+ website_endpoint : `http://%(bucket)s.website-${ region } .digitaloceanspaces.com` ,
453
+ access_key,
454
+ secret_key,
455
+ } ) ,
448
456
linode : ( { region = 'eu-central-1' , access_key = '' , secret_key = '' } ) => ( {
449
457
bucket_location : 'US' ,
450
458
host_base : `${ region } .linodeobjects.com` ,
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ const providers = {
9
9
access_key,
10
10
secret_key,
11
11
} ) ,
12
+ digitalocean : ( { region = 'nyc3' , access_key = '' , secret_key = '' } ) => ( {
13
+ bucket_location : region ,
14
+ host_base : `${ region } .digitaloceanspaces.com` ,
15
+ host_bucket : `%(bucket)s.${ region } .digitaloceanspaces.com` ,
16
+ website_endpoint : `http://%(bucket)s.website-${ region } .digitaloceanspaces.com` ,
17
+ access_key,
18
+ secret_key,
19
+ } ) ,
12
20
linode : ( { region = 'eu-central-1' , access_key = '' , secret_key = '' } ) => ( {
13
21
bucket_location : 'US' ,
14
22
host_base : `${ region } .linodeobjects.com` ,
Original file line number Diff line number Diff line change @@ -7,9 +7,18 @@ const conf = makeConf(providers.linode({
7
7
secret_key : 'more secret'
8
8
} ) )
9
9
10
+ const conf2 = makeConf ( providers . digitalocean ( {
11
+ cluster : "nyc3" ,
12
+ access_key : 'top-secret' ,
13
+ secret_key : 'more secret'
14
+ } ) )
15
+
10
16
const writer = createWriteStream ( 'test' )
11
17
12
18
for ( const line of conf ) {
13
19
writer . write ( line + '\r\n' )
14
20
}
15
21
22
+ for ( const line of conf2 ) {
23
+ writer . write ( line + '\r\n' )
24
+ }
You can’t perform that action at this time.
0 commit comments