Skip to content

Commit f21c47f

Browse files
committed
docs: add pinned-by-SHA usage example to README
Addresses review feedback on PR #538 by documenting the recommended practice of pinning the action to a full commit SHA for supply-chain security, in line with GitHub's hardening guidance.
1 parent 17e209a commit f21c47f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,21 @@ Following are the key capabilities of this action:
147147

148148
## Usage Examples
149149

150+
### Pinning the action version
151+
152+
For supply-chain security, GitHub [recommends](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions) pinning third-party actions to a full-length commit SHA rather than a mutable tag. The examples below use `Azure/k8s-deploy@v7` for readability, but the pinned form is preferred in production workflows:
153+
154+
```yaml
155+
# Pinned to a specific commit SHA (recommended)
156+
- uses: Azure/k8s-deploy@<full-commit-sha> # v7.0.0
157+
with:
158+
manifests: |
159+
deployment.yaml
160+
service.yaml
161+
```
162+
163+
Replace `<full-commit-sha>` with the 40-character commit SHA of the [release](https://github.com/Azure/k8s-deploy/releases) you want to pin to. Dependabot can keep pinned SHAs up to date automatically — see [Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot).
164+
150165
### Basic deployment (without any deployment strategy)
151166

152167
```yaml

0 commit comments

Comments
 (0)