From 4b8d56bbbdcbdcfcdfa551a8056f53f18f70d8ac Mon Sep 17 00:00:00 2001 From: Nico Braun Date: Tue, 6 Apr 2021 13:47:22 +0000 Subject: [PATCH] fix mb bug --- .github/workflows/example.yml | 2 +- README.md | 4 +- index.js | 169 +++++++++++++++++----------------- 3 files changed, 89 insertions(+), 86 deletions(-) diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 406e3d0..832e737 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -4,7 +4,7 @@ on: - main jobs: - expose_s3cmd: + use_s3cmd: runs-on: ubuntu-latest name: Use S3cmd diff --git a/README.md b/README.md index bb70958..f3a3bbb 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ on: - main jobs: - expose_s3cmd: + use_s3cmd: runs-on: ubuntu-latest name: Use S3cmd @@ -44,3 +44,5 @@ jobs: s3cmd put bar s3://foobarbaz ``` + + diff --git a/index.js b/index.js index bd55f51..7a98565 100644 --- a/index.js +++ b/index.js @@ -1,87 +1,88 @@ -const conf = (cluster, access_key, secret_key) => `[default] -access_key = ${access_key} -access_token = -add_encoding_exts = -add_headers = -bucket_location = EU -ca_certs_file = -cache_file = -check_ssl_certificate = True -check_ssl_hostname = True -cloudfront_host = cloudfront.amazonaws.com -connection_pooling = True -content_disposition = -content_type = -default_mime_type = binary/octet-stream -delay_updates = False -delete_after = False -delete_after_fetch = False -delete_removed = False -dry_run = False -enable_multipart = True -encoding = UTF-8 -encrypt = False -expiry_date = -expiry_days = -expiry_prefix = -follow_symlinks = False -force = False -get_continue = False -gpg_command = /usr/bin/gpg -gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s -gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s -gpg_passphrase = f3Gf3dgl7jpY6(Tgvb$fg8Jf?13de34dF -guess_mime_type = True -host_base = ${cluster}.linodeobjects.com -host_bucket = %(bucket)s.${cluster}.linodeobjects.com -human_readable_sizes = True -invalidate_default_index_on_cf = False -invalidate_default_index_root_on_cf = True -invalidate_on_cf = False -kms_key = -limit = -1 -limitrate = 0 -list_md5 = False -log_target_prefix = -long_listing = False -max_delete = -1 -mime_type = -multipart_chunk_size_mb = 15 -multipart_max_chunks = 10000 -preserve_attrs = True -progress_meter = True -proxy_host = -proxy_port = 0 -public_url_use_https = False -put_continue = False -recursive = False -recv_chunk = 65536 -reduced_redundancy = False -requester_pays = False -restore_days = 1 -restore_priority = Standard -secret_key = ${secret_key} -send_chunk = 65536 -server_side_encryption = False -signature_v2 = False -signurl_use_https = False -simpledb_host = sdb.amazonaws.com -skip_existing = False -socket_timeout = 300 -stats = False -stop_on_error = False -storage_class = -throttle_max = 100 -upload_id = -urlencoding_mode = normal -use_http_expect = False -use_https = True -use_mime_magic = True -verbosity = ERROR -website_endpoint = http://%(bucket)s.website-${cluster}.linodeobjects.com/ -website_error = 404.html -website_index = index.html -`; +const conf = (cluster, access_key, secret_key) => [ + `[default]`, + `access_key = ${access_key}`, + `access_token = `, + `add_encoding_exts = `, + `add_headers = `, + `bucket_location = US`, // must be US when using linode, regardless of actual location + `ca_certs_file = `, + `cache_file = `, + `check_ssl_certificate = True`, + `check_ssl_hostname = True`, + `cloudfront_host = cloudfront.amazonaws.com`, + `connection_pooling = True`, + `content_disposition = `, + `content_type = `, + `default_mime_type = binary/octet-stream`, + `delay_updates = False`, + `delete_after = False`, + `delete_after_fetch = False`, + `delete_removed = False`, + `dry_run = False`, + `enable_multipart = True`, + `encoding = UTF-8`, + `encrypt = False`, + `expiry_date = `, + `expiry_days = `, + `expiry_prefix = `, + `follow_symlinks = False`, + `force = False`, + `get_continue = False`, + `gpg_command = /usr/bin/gpg`, + `gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s`, + `gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s`, + `gpg_passphrase = f3Gf3dgl7jpY6(Tgvb$fg8Jf?13de34dF`, + `guess_mime_type = True`, + `host_base = ${cluster}.linodeobjects.com`, // AWS: s3.amazonaws.com, alternatives such as s3-eu- west-1.amazonaws.com + `host_bucket = %(bucket)s.${cluster}.linodeobjects.com`, // AWS: %(bucket)s.s3.amazonaws.com + `human_readable_sizes = True`, + `invalidate_default_index_on_cf = False`, + `invalidate_default_index_root_on_cf = True`, + `invalidate_on_cf = False`, + `kms_key = `, + `limit = -1`, + `limitrate = 0`, + `list_md5 = False`, + `log_target_prefix = `, + `long_listing = False`, + `max_delete = -1`, + `mime_type = `, + `multipart_chunk_size_mb = 15`, + `multipart_max_chunks = 10000`, + `preserve_attrs = True`, + `progress_meter = True`, + `proxy_host = `, + `proxy_port = 0`, + `public_url_use_https = False`, + `put_continue = False`, + `recursive = False`, + `recv_chunk = 65536`, + `reduced_redundancy = False`, + `requester_pays = False`, + `restore_days = 1`, + `restore_priority = Standard`, + `secret_key = ${secret_key}`, + `send_chunk = 65536`, + `server_side_encryption = False`, + `signature_v2 = False`, + `signurl_use_https = False`, + `simpledb_host = sdb.amazonaws.com`, + `skip_existing = False`, + `socket_timeout = 300`, + `stats = False`, + `stop_on_error = False`, + `storage_class = `, + `throttle_max = 100`, + `upload_id = `, + `urlencoding_mode = normal`, + `use_http_expect = False`, + `use_https = True`, + `use_mime_magic = True`, + `verbosity = ERROR`, + `website_endpoint = http://%(bucket)s.website-${cluster}.linodeobjects.com/`, + `website_error = 404.html`, + `website_index = index.html`, +].join('/n'); const core = require('@actions/core'); const homedir = require('os').homedir();