A Github Action for uploading files to the WebDAV server
Go to file
Lemon ac85a54fc0
fix: input not require need default value
2022-12-29 16:35:17 +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__ feat: support keep file structure 2022-12-29 12:34:45 +08:00
dist fix: input not require need default value 2022-12-29 16:35:17 +08:00
src fix: input not require need default value 2022-12-29 16:35:17 +08:00
test test: add some test 2022-01-22 11:39:26 +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 init project 2022-01-22 00:19:31 +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 feat: support keep file structure 2022-12-29 12:34:45 +08:00
action.yml fix: input not require need default value 2022-12-29 16:35:17 +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/jest to v29.2.4 2022-12-13 21:01:03 +08:00
package.json chore(deps): update dependency @types/jest to v29.2.4 2022-12-13 21:01:03 +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

📤 :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 using the Actions secrets, check in https://docs.github.com/en/actions/security-guides/encrypted-secrets

✍️ 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 server not support 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 when exist unmatched file pattern false
keep_structure Keep the directory structure of the files
Only support single search path, rule
false

🚳 Now we just support the basic authentication

⚠️ If the upload path contains same file name, the file will be overwritten

🪴 Detail

files

Using the @action/glob to search for files matching glob patterns. You can set muliple pattern to active the search.

Pattern Details

Patterns

Glob behavior

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

With the following behaviors:

  • File names that begin with . may be included in the results
  • Case insensitive on Windows
  • Directory separator / and \ 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

Wrapping special characters in [] can be used to escape literal glob characters in a file name. 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