Fix CLI secrets examples (#4685)

This commit is contained in:
qwerty287 2025-01-08 17:51:40 +02:00 committed by GitHub
parent fcc2dbdf2e
commit 1f53da1a00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -104,7 +104,7 @@ Create the secret using default settings.
The secret will be available to all images in your pipeline, and will be available to all `push`, `tag`, and `deployment` events (not `pull_request` events).
```bash
woodpecker-cli secret add \
woodpecker-cli repo secret add \
--repository octocat/hello-world \
--name aws_access_key_id \
--value <value>
@ -115,7 +115,7 @@ Create the secret and limit it to a single image:
```diff
woodpecker-cli secret add \
--repository octocat/hello-world \
+ --image plugins/s3 \
+ --image woodpeckerci/plugin-s3 \
--name aws_access_key_id \
--value <value>
```
@ -123,10 +123,10 @@ Create the secret and limit it to a single image:
Create the secrets and limit it to a set of images:
```diff
woodpecker-cli secret add \
woodpecker-cli repo secret add \
--repository octocat/hello-world \
+ --image plugins/s3 \
+ --image woodpeckerci/plugin-ecs \
+ --image woodpeckerci/plugin-s3 \
+ --image woodpeckerci/plugin-docker-buildx \
--name aws_access_key_id \
--value <value>
```
@ -134,9 +134,9 @@ Create the secrets and limit it to a set of images:
Create the secret and enable it for multiple hook events:
```diff
woodpecker-cli secret add \
woodpecker-cli repo secret add \
--repository octocat/hello-world \
--image plugins/s3 \
--image woodpeckerci/plugin-s3 \
+ --event pull_request \
+ --event push \
+ --event tag \
@ -149,7 +149,7 @@ This method is recommended for loading secrets from a file, as it ensures that n
Heres an example:
```diff
woodpecker-cli secret add \
woodpecker-cli repo secret add \
-repository octocat/hello-world \
-name ssh_key \
+ -value @/root/ssh/id_rsa