Skip to content

Commit

Permalink
Adding base path
Browse files Browse the repository at this point in the history
  • Loading branch information
armhil committed Nov 5, 2022
1 parent 31dd7a9 commit 1070687
Show file tree
Hide file tree
Showing 5 changed files with 3,567 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ See the `directoriesToUpload` parameter, which supports passing multiple directo
uses: armhil/azure-blobs-content-uploader@1.0.0
with:
azureBlobConfiguration: ${{ secrets.AZ_BLOB_CONFIGURATION }} # could be any secret that you have, see below for the format
directoriesToUpload: '[{"path": "test/integrationtest-directory", "shouldRecurse": "true" }]'
directoriesToUpload: '[{"path": "test/integrationtest-directory", "shouldRecurse": "true", "baseContainerPath": "somePath" }]'
```
### Azure blob details
Expand All @@ -30,7 +30,7 @@ The content uploader supports uploading to multiple storage accounts, so you're
uses: armhil/azure-blobs-content-uploader@1.0.0
with:
azureBlobConfiguration: ${{ secrets.AZ_BLOB_CONFIGURATION }} # could be any secret that you have, see below for the format
directoriesToUpload: '[{"path": "test/integrationtest-directory", "shouldRecurse": "true" }]'
directoriesToUpload: '[{"path": "test/integrationtest-directory", "shouldRecurse": "true", "baseContainerPath": "somePath" }]'
```
You should use the below format for the `azureBlobConfiguration` parameter and this value should come from the secrets. **azureBlobConfiguration parameter is expected to contain the connection strings to blob storage accounts, so it's incredibly important to store it in github repository secrets, rather than some plaintext mechanism**.
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ try {
const directoriesToUpload = JSON.parse(core.getInput('directoriesToUpload')) || [];
let filesToUpload = [];
directoriesToUpload.forEach(t => {
filesToUpload = filesToUpload.concat(fileUtils.getFilesForUpload(t.path, t.shouldRecurse, Object.keys(fileTypesToUpload)));
filesToUpload = filesToUpload.concat(fileUtils.getFilesForUpload(t.path, t.shouldRecurse, t.baseContainerPath, Object.keys(fileTypesToUpload)));
});
/**
* Azure Blob Configurations should look like
Expand Down
Loading

0 comments on commit 1070687

Please sign in to comment.