Skip to content

Commit

Permalink
make overwrite a mandatory flag to fix parsing issues
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
  • Loading branch information
bacongobbler committed Mar 2, 2022
1 parent 634a3c1 commit 1bc9b77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ jobs:
| `source_dir` | The name of the directory you want to upload |
| `container_name` | The name of the storage account container these assets will be uploaded to |
| `connection_string` | Your Azure Blob Storage connection string |
| `sync` | Use `az storage blob sync` to synchronize blobs recursively |
| `overwrite` | Overwrite existing files in the destination container |

### Optional Variables

| Key | Value |
|--------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `extra_args` | Extra arguments that can be passed to `az storage blob upload-batch`. Useful for passing flags like `--pattern` or `--destination-path` |
| `sas_token` | The shared access signature token for the storage account. Either connection\_string or sas\_token must be supplied |
| `sync` | Use `az storage blob sync` to synchronize blobs recursively. Defaults to false (`az storage blob upload-batch`) |
| `overwrite` | Overwrite existing files in the destination container. Defaults to false |

## License

Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ inputs:
required: false
sync:
description: "Use `az storage blob sync` to synchronize blobs recursively"
required: false
required: true
overwrite:
description: "Overwrite existing files in the destination container. Defaults to false"
required: false
required: true
runs:
using: "docker"
image: "Dockerfile"
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ else
fi

ARG_OVERWRITE=""
if ! [[ -z ${INPUT_OVERWRITE} ]]; then
if [[ -z ${INPUT_OVERWRITE} ]]; then
ARG_OVERWRITE="--overwrite true"
fi

Expand All @@ -40,7 +40,7 @@ fi

VERB="upload-batch"
CONTAINER_NAME_FLAG="--destination"
if ! [[ -z ${INPUT_SYNC} ]]; then
if [[ -z ${INPUT_SYNC} ]]; then
VERB="sync"
CONTAINER_NAME_FLAG="--container"
fi
Expand Down

0 comments on commit 1bc9b77

Please sign in to comment.