Skip to content

Commit

Permalink
feat: pin-github-action
Browse files Browse the repository at this point in the history
Signed-off-by: thediveo <thediveo@gmx.eu>
  • Loading branch information
thediveo committed Jan 5, 2025
1 parent 566327f commit 6a9dc4d
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
set of presets.
- [go-mod-upgrade](src/go-mod-upgrade/README.md) – provides obligot's `go-mod-upgrade`
for updating outdated Go dependencies interactively.
- [pin-github-action](src/pin-github-action/README.md) – provides mheaps's
`pin-github-action` for pinning GitHub actions to specific hashes.
2 changes: 1 addition & 1 deletion src/docsify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ created.

---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/thediveo/devcontainer-features/blob/main/src/docsify/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
_Note: This file was auto-generated from the [devcontainer-feature.json](devcontainer-feature.json). Add additional notes to a `NOTES.md`._
2 changes: 1 addition & 1 deletion src/go-mod-upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Tested only with

---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/thediveo/devcontainer-features/blob/main/src/go-mod-upgrade/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
_Note: This file was auto-generated from the [devcontainer-feature.json](devcontainer-feature.json). Add additional notes to a `NOTES.md`._
2 changes: 1 addition & 1 deletion src/gocover/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ Tested only with

---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/thediveo/devcontainer-features/blob/main/src/gocover/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
_Note: This file was auto-generated from the [devcontainer-feature.json](devcontainer-feature.json). Add additional notes to a `NOTES.md`._
2 changes: 1 addition & 1 deletion src/goreportcard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Tested only with

---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/thediveo/devcontainer-features/blob/main/src/goreportcard/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
_Note: This file was auto-generated from the [devcontainer-feature.json](devcontainer-feature.json). Add additional notes to a `NOTES.md`._
2 changes: 1 addition & 1 deletion src/local-pkgsite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ forms the basis for this devcontainer feature.

---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/thediveo/devcontainer-features/blob/main/src/local-pkgsite/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
_Note: This file was auto-generated from the [devcontainer-feature.json](devcontainer-feature.json). Add additional notes to a `NOTES.md`._
4 changes: 4 additions & 0 deletions src/pin-github-action/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## OS Support

Tested only with
[mcr.microsoft.com/devcontainers/base:ubuntu](https://mcr.microsoft.com/en-us/artifact/mar/devcontainers/base/about#about:_ubuntu).
24 changes: 24 additions & 0 deletions src/pin-github-action/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# pin-github-action (pin-github-action)

Pin your GitHub actions to a specific hash.

## Example Usage

```json
"features": {
"ghcr.io/thediveo/devcontainer-features/pin-github-action:0": {}
}
```



## OS Support

Tested only with
[mcr.microsoft.com/devcontainers/base:ubuntu](https://mcr.microsoft.com/en-us/artifact/mar/devcontainers/base/about#about:_ubuntu).


---

_Note: This file was auto-generated from the [devcontainer-feature.json](devcontainer-feature.json). Add additional notes to a `NOTES.md`._
11 changes: 11 additions & 0 deletions src/pin-github-action/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "pin-github-action",
"id": "pin-github-action",
"version": "0.1.0",
"description": "Pin your GitHub actions to a specific hash.",
"dependsOn": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
}
}
9 changes: 9 additions & 0 deletions src/pin-github-action/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e

DOCSIFY_SERVE_PATH="/usr/local/bin/docsify-serve"

DOCS_PATH=${DOCS_PATH:-docs}

echo "Activating feature 'pin-github-action'..."
npm install -g pin-github-action
9 changes: 9 additions & 0 deletions test/pin-github-action/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -e

source dev-container-features-test-lib

check "pin-github-action" bash -c "pin-github-action --version | grep -E [0-9]+\.[0-9]+\.[0-9]+"

reportResults

0 comments on commit 6a9dc4d

Please sign in to comment.