Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set path style for buckets #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Folleach
Copy link

I've self-hosted s3 service that does not support specifies buckets by domain.
But it supports path style buckets, like this: https://s3.example.net/{bucket}/

When I tried to use this action for site bucket at the s3.example.net, I got an error

Error: UnknownEndpoint: Inaccessible host: `site.s3.example.net' at port `undefined'. This service may not be available in the `us-east-1' region.

After research the aws-sdk library led me to the s3ForcePathStyle field which allows to change this behavior.

So, I added this field as force_path_style to action and changed workflow:

 - uses: shallwefootball/s3-upload-action@master
   with:
     aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
     aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
     aws_bucket: site
     source_dir: ./client/build
     destination_dir: public
     endpoint: https://s3.example.net/
+    force_path_style: true

Now it works well!
The only thing is... I'm newbie at the object storage, maybe I could achieve the same goal in an alternative way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant