Skip to content

Commit e324a21

Browse files
authored
v1.7.1
2 parents e734994 + 3011ac9 commit e324a21

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

README.md

+20-16
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,21 @@ jobs:
5858
5959
### Input Parameters
6060
61-
| Parameter | Required | Default | Description |
62-
|----------------------------|:--------:|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
63-
| `name` | no | `'artifact'` | Name of the artifact to upload. |
64-
| `working-directory` | no | `''` | |
65-
| `path` | yes | | A list of files, directories or wildcard patterns that describes what to upload. |
66-
| `if-no-files-found` | no | `'warn'` | The desired behavior if no files are found using the provided path.<br/>Available Options:<br/> • `warn`: Output a warning but do not fail the action<br/> • `error`: Fail the action with an error message<br/> • `ignore`: Do not output any warnings or errors, the action does not fail |
67-
| `retention-days` | no | repository settings | Duration after which artifact will expire in days. 0 means using default retention. <br/> Minimum 1 day.<br/> Maximum 90 days unless changed from the repository settings page. |
68-
| `compression-level` | no | `6` | The level of compression for Zlib to be applied to the artifact archive.<br/> The value can range from 0 to 9.<br/> For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads. |
69-
| `overwrite` | no | `false` | If true, an artifact with a matching name will be deleted before a new one is uploaded.<br/> If false, the action will fail if an artifact for the given name already exists.<br/> Does not fail if the artifact does not exist. |
70-
| `include-hidden-files`[^2] | no | `false` | Whether to include hidden files in the provided path in the artifact.<br/> The file contents of any hidden files in the path should be validated before enabled this to avoid uploading sensitive information. |
71-
| `mode`[^3] | no | `'tar'` | Mode of operation. Allowed modes:<br/> • `tar` (default),<br/> • `legacy` |
72-
| `investigate` | no | `false` | If enabled, list content of the created tarball. |
73-
| `tarball-name` | no | [^1] | Filename of the embedded tarball. |
61+
| Parameter | Required | Default | Description |
62+
|------------------------|:--------:|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
63+
| `name` | no | `'artifact'` | Name of the artifact to upload. |
64+
| `working-directory` | no | `''` | |
65+
| `path` | yes | | A list of files, directories or wildcard patterns that describes what to upload. |
66+
| `if-no-files-found` | no | `'warn'` | The desired behavior if no files are found using the provided path.<br/>Available Options:<br/> • `warn`: Output a warning but do not fail the action<br/> • `error`: Fail the action with an error message<br/> • `ignore`: Do not output any warnings or errors, the action does not fail |
67+
| `retention-days` | no | repository settings | Duration after which artifact will expire in days. 0 means using default retention. <br/> Minimum 1 day.<br/> Maximum 90 days unless changed from the repository settings page. |
68+
| `compression-level` | no | `6` | The level of compression for Zlib to be applied to the artifact archive.<br/> The value can range from 0 to 9.<br/> For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads. |
69+
| `overwrite` | no | `false` | If true, an artifact with a matching name will be deleted before a new one is uploaded.<br/> If false, the action will fail if an artifact for the given name already exists.<br/> Does not fail if the artifact does not exist. |
70+
| `include-hidden-files` | no | `false` | Whether to include hidden files in the provided path in the artifact.<br/> The file contents of any hidden files in the path should be validated before enabled this to avoid uploading sensitive information. |
71+
| `mode` | no | `'tar'` | Mode of operation. Allowed modes:<br/> • `tar` (default),<br/> • `legacy` |
72+
| `investigate` | no | `false` | If enabled, list content of the created tarball. |
73+
| `tarball-name` | no | [^1] | Filename of the embedded tarball. |
7474

7575
[^1]: `'__pyTooling_upload_artifact__.tar'`
76-
[^2]: [Hidden files are included, when directories are uploaded bug](https://github.com/pyTooling/upload-artifact/issues/20)
77-
[^3]: [Add a legacy mode](https://github.com/pyTooling/upload-artifact/issues/22)
7876

7977
### Output Parameters
8078

@@ -86,7 +84,7 @@ jobs:
8684

8785
## Fixed behavior compared to `actions/upload-artifact`
8886

89-
1. **Do preserve file permissions**
87+
1. **Preserve file permissions**
9088
The artifact's content is collected in a tarball, which allows preserving file attributes like file permissions.
9189
2. **Don't remove common prefix from files**
9290
`actions/upload-artifact` removes the common prefix from all files before storing in an artifact. This is not a
@@ -95,6 +93,12 @@ jobs:
9593
This action defines a root directory from where the content of the tarball is constructed. This is independent of the
9694
list of provided file patterns.
9795

96+
## Further Features
97+
98+
* Files can be uploaded as a legacy artifact using `actions/upload-artifact`.
99+
`pyTooling/download-artifact` accepts artifacts from `actions/upload-artifact`, `pyTooling/upload-artifact` *tar* mode
100+
and `pyTooling/upload-artifact` *legacy* mode.
101+
98102

99103
## Limitations of `tar`
100104

action.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ runs:
143143
fi
144144
145145
if [[ "${{ runner.os }}" == "macOS" ]]; then
146+
printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Install newer 'bash' via homebrew ..."
147+
brew install bash
148+
printf "::endgroup::\n"
149+
146150
tarProg="gtar"
147151
else
148152
tarProg="tar"
@@ -249,7 +253,7 @@ runs:
249253
if: inputs.include-hidden-files == 'false'
250254
shell: bash
251255
run: |
252-
# List content of the generated tarball
256+
# Remove dot-files if not explicitly included
253257
set +e
254258
255259
ANSI_CYAN=$'\x1b[36m'

0 commit comments

Comments
 (0)