From c94a135d4a1c6cc54802a5723140bba96a95b4a6 Mon Sep 17 00:00:00 2001 From: xor-gate Date: Fri, 12 Jul 2024 15:25:32 +0000 Subject: [PATCH] Add note about how to use secrets in workflow (#17) Document how to use secrets in workflow Co-authored-by: Jerry Jacobs Co-authored-by: Lunny Xiao Reviewed-on: https://gitea.com/gitea/docs/pulls/17 Reviewed-by: Lunny Xiao Co-authored-by: xor-gate Co-committed-by: xor-gate --- docs/usage/actions/secrets.md | 9 ++++++++- versioned_docs/version-1.19/usage/secrets.md | 9 ++++++++- versioned_docs/version-1.20/usage/secrets.md | 9 ++++++++- versioned_docs/version-1.21/usage/secrets.md | 9 ++++++++- versioned_docs/version-1.22/usage/actions/secrets.md | 9 ++++++++- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/docs/usage/actions/secrets.md b/docs/usage/actions/secrets.md index 199b40ae..e663f36d 100644 --- a/docs/usage/actions/secrets.md +++ b/docs/usage/actions/secrets.md @@ -1,5 +1,5 @@ --- -date: "2022-12-19T21:26:00+08:00" +date: "2024-07-10T09:23:00+02:00" slug: "secrets" sidebar_position: 50 --- @@ -25,4 +25,11 @@ The following rules apply to secret names: For example, a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level. +### Using secrets + +After creating configuration variables, they will be automatically filled in the `secrets` context. +They can be accessed through expressions like `${{ secrets.SECRET_NAME }}` in the workflow. + +### Precedence + If a secret with the same name exists at multiple levels, the secret at the lowest level takes precedence. For example, if an organization-level secret has the same name as a repository-level secret, then the repository-level secret takes precedence. diff --git a/versioned_docs/version-1.19/usage/secrets.md b/versioned_docs/version-1.19/usage/secrets.md index e28bd2dd..a0bb9c3e 100644 --- a/versioned_docs/version-1.19/usage/secrets.md +++ b/versioned_docs/version-1.19/usage/secrets.md @@ -1,5 +1,5 @@ --- -date: "2022-12-19T21:26:00+08:00" +date: "2024-07-10T09:23:00+02:00" title: "Secrets" slug: "usage/secrets" sidebar_position: 50 @@ -34,4 +34,11 @@ The following rules apply to secret names: For example, a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level. +### Using secrets + +After creating configuration variables, they will be automatically filled in the `secrets` context. +They can be accessed through expressions like `${{ secrets.SECRET_NAME }}` in the workflow. + +### Precedence + If a secret with the same name exists at multiple levels, the secret at the lowest level takes precedence. For example, if an organization-level secret has the same name as a repository-level secret, then the repository-level secret takes precedence. diff --git a/versioned_docs/version-1.20/usage/secrets.md b/versioned_docs/version-1.20/usage/secrets.md index 8ad67466..82add863 100644 --- a/versioned_docs/version-1.20/usage/secrets.md +++ b/versioned_docs/version-1.20/usage/secrets.md @@ -1,5 +1,5 @@ --- -date: "2022-12-19T21:26:00+08:00" +date: "2024-07-10T09:23:00+02:00" title: "Secrets" slug: "secrets" sidebar_position: 50 @@ -36,4 +36,11 @@ The following rules apply to secret names: For example, a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level. +### Using secrets + +After creating configuration variables, they will be automatically filled in the `secrets` context. +They can be accessed through expressions like `${{ secrets.SECRET_NAME }}` in the workflow. + +### Precedence + If a secret with the same name exists at multiple levels, the secret at the lowest level takes precedence. For example, if an organization-level secret has the same name as a repository-level secret, then the repository-level secret takes precedence. diff --git a/versioned_docs/version-1.21/usage/secrets.md b/versioned_docs/version-1.21/usage/secrets.md index 8ad67466..82add863 100644 --- a/versioned_docs/version-1.21/usage/secrets.md +++ b/versioned_docs/version-1.21/usage/secrets.md @@ -1,5 +1,5 @@ --- -date: "2022-12-19T21:26:00+08:00" +date: "2024-07-10T09:23:00+02:00" title: "Secrets" slug: "secrets" sidebar_position: 50 @@ -36,4 +36,11 @@ The following rules apply to secret names: For example, a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level. +### Using secrets + +After creating configuration variables, they will be automatically filled in the `secrets` context. +They can be accessed through expressions like `${{ secrets.SECRET_NAME }}` in the workflow. + +### Precedence + If a secret with the same name exists at multiple levels, the secret at the lowest level takes precedence. For example, if an organization-level secret has the same name as a repository-level secret, then the repository-level secret takes precedence. diff --git a/versioned_docs/version-1.22/usage/actions/secrets.md b/versioned_docs/version-1.22/usage/actions/secrets.md index 199b40ae..e663f36d 100644 --- a/versioned_docs/version-1.22/usage/actions/secrets.md +++ b/versioned_docs/version-1.22/usage/actions/secrets.md @@ -1,5 +1,5 @@ --- -date: "2022-12-19T21:26:00+08:00" +date: "2024-07-10T09:23:00+02:00" slug: "secrets" sidebar_position: 50 --- @@ -25,4 +25,11 @@ The following rules apply to secret names: For example, a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level. +### Using secrets + +After creating configuration variables, they will be automatically filled in the `secrets` context. +They can be accessed through expressions like `${{ secrets.SECRET_NAME }}` in the workflow. + +### Precedence + If a secret with the same name exists at multiple levels, the secret at the lowest level takes precedence. For example, if an organization-level secret has the same name as a repository-level secret, then the repository-level secret takes precedence.