A Github Action for uploading files to the WebDAV server
Go to file
Lemon 2a3e52d121
Update README.md
2023-04-05 04:43:04 +08:00
.github/workflows feat: support keep file structure 2022-12-29 12:34:45 +08:00
.husky init project 2022-01-22 00:19:31 +08:00
__tests__ fix: upload error code handler 2023-01-23 02:53:19 +08:00
dist fix: upload error code handler 2023-01-23 02:53:19 +08:00
src fix: upload error code handler 2023-01-23 02:53:19 +08:00
test test: add test file 2023-01-19 00:54:32 +08:00
.eslintignore init project 2022-01-22 00:19:31 +08:00
.eslintrc.json init project 2022-01-22 00:19:31 +08:00
.gitattributes init project 2022-01-22 00:19:31 +08:00
.gitignore test: add test file 2023-01-19 00:54:32 +08:00
.prettierignore init project 2022-01-22 00:19:31 +08:00
.prettierrc.json init project 2022-01-22 00:19:31 +08:00
LICENSE Create LICENSE 2022-01-26 16:32:30 +08:00
README.md Update README.md 2023-04-05 04:43:04 +08:00
action.yml fix: upload error code handler 2023-01-23 02:53:19 +08:00
jest.config.js fix: concat not using 2022-01-22 01:11:30 +08:00
package-lock.json chore(deps): update dependency @types/node to v16.18.11 2023-01-19 20:56:52 +08:00
package.json chore(deps): update dependency @types/node to v16.18.11 2023-01-19 20:56:52 +08:00
renovate.json Add renovate.json 2022-01-21 16:20:26 +00:00
tsconfig.json init project 2022-01-22 00:19:31 +08:00

README.md

Working on https://github.com/bxb100/action-upload

📤 :octocat:

action upload-webdav

A Github Action for uploading files to a WebDAV server

🤸 Usage

  uses: bxb100/action-upload-webdav@v1
  with:
    webdav_address: ${{secrets.address}}
    webdav_username: ${{secrets.username}}
    webdav_password: ${{secrets.password}}
    webdav_upload_path: "/data"
    files: "./test/**"

⚠️ for security purpose, please use Actions Secrets. See https://docs.github.com/en/actions/security-guides/encrypted-secrets for more information.

✍️ All Parameters

Input Description Default
webdav_address WebDAV address -
webdav_username WebDAV username -
webdav_password WebDAV password -
webdav_upload_path The WebDAV path where you want to upload. Some servers may not support the root path -
files Newline-delimited list of path globs for asset files to upload
🐾 You can learn more about multi-line YAML syntax here
-
fail_on_unmatched_files Fail the action if there exists an unmatched file pattern false
keep_structure Keep the directory structure of the files
Only supports a single search path, rule
false

🚳 This project only supports basic authentication

⚠️ If the upload path contains an existing filename, the file will be overwritten

🪴 Details

files

Use the @action/glob to search for files matching glob patterns. You can set multiple patterns.

Pattern Details

Patterns

Glob behavior

Patterns *, ?, [...], ** (globstar) are supported.

With the following behaviors:

  • File names that begin with . will be included in the results
  • Case-insensitive on Windows
  • Directory separators / and \ are both supported on Windows

Tilde expansion

Supports basic tilde expansion, for current-user HOME replacement only.

Example:

  • ~ may expand to /Users/johndoe
  • ~/foo may expand to /Users/johndoe/foo

Comments

Patterns that begin with # are treated as comments.

Exclude patterns

Leading ! changes the meaning of an include pattern to exclude.

Multiple leading ! flips the meaning.

Escaping

Escape special glob characters by wrapping in []. For example the literal file name hello[a-z] can be escaped as hello[[]a-z].

On Linux/macOS \ is also treated as an escape character.

📖 Thanks