Skip to content

Commit

Permalink
revert: check for string values
Browse files Browse the repository at this point in the history
update the docs to reflect this behavior

actions/runner#1483

Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
  • Loading branch information
bacongobbler committed Mar 2, 2022
1 parent 1bc9b77 commit a0146a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
connection_string: ${{ secrets.ConnectionString }}
extra_args: '--pattern *.tar.gz'
# WARNING: this will overwrite existing blobs in your blob storage
overwrite: true
overwrite: 'true'
```

If you want to synchronize local and remote state (for example, if you are publishing a static website), enable the `sync` flag.
Expand All @@ -50,7 +50,7 @@ jobs:
source_dir: 'public'
container_name: '$web'
connection_string: ${{ secrets.ConnectionString }}
sync: true
sync: 'true'
```

### Required Variables
Expand All @@ -60,15 +60,16 @@ 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: true
required: false
overwrite:
description: "Overwrite existing files in the destination container. Defaults to false"
required: true
required: false
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 a0146a6

Please sign in to comment.