Skip to content

Commit 1126277

Browse files
authored
Merge pull request #6 from useblacksmith/implement-delete-by-key
*: implement sticky disk delete action with delete-by-key functionality
2 parents 37799a4 + 9eeee61 commit 1126277

File tree

9 files changed

+2099
-1718
lines changed

9 files changed

+2099
-1718
lines changed

.github/workflows/build.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,25 @@ on:
77
jobs:
88
build-action:
99
name: Build Action
10-
runs-on: ubuntu-24.04
10+
runs-on: ${{ matrix.runner }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
runner: [blacksmith, blacksmith-arm]
1115
steps:
1216
- name: Checkout Project
13-
uses: actions/checkout@v5.0.0
17+
uses: actions/checkout@v4
1418

1519
- name: Setup pnpm
16-
uses: threeal/setup-pnpm-action@v1.0.0
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 8
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 24
28+
cache: pnpm
1729

1830
- name: Install Dependencies
1931
run: pnpm install

.github/workflows/test.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,28 @@ on:
77
jobs:
88
test-action:
99
name: Test Action
10-
runs-on: ${{ matrix.os }}
10+
runs-on: ${{ matrix.runner }}
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
os: [ubuntu-24.04, macos-14, windows-2022]
14+
runner: [blacksmith, blacksmith-arm]
1515
steps:
1616
- name: Checkout Action
17-
uses: actions/checkout@v5.0.0
17+
uses: actions/checkout@v4
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
1821
with:
19-
path: mkdir-action
20-
sparse-checkout: |
21-
action.yml
22-
dist
23-
sparse-checkout-cone-mode: false
22+
version: 8
2423

25-
- name: Create Directory
26-
uses: ./mkdir-action
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
2726
with:
28-
path: parent/child
27+
node-version: 24
28+
cache: pnpm
29+
30+
- name: Install Dependencies
31+
run: pnpm install
2932

30-
- name: Check Directory
31-
shell: bash
32-
run: test -d parent/child
33+
- name: Run Tests
34+
run: pnpm test

action.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1-
# TODO: Modify the following metadata according to the project's specifications.
2-
3-
name: Mkdir Action
4-
author: Alfi Maulana
5-
description: Create a new directory
1+
name: Sticky Disk Delete
2+
author: Blacksmith
3+
description: Delete sticky disks programmatically through GitHub Actions
64
branding:
7-
icon: folder-plus
8-
color: black
5+
icon: trash-2
6+
color: red
97
inputs:
10-
path:
11-
description: Path of the directory to create
12-
required: true
8+
delete-key:
9+
description: |
10+
Delete a specific sticky disk by its key. The key is the unique identifier
11+
you provided when creating the sticky disk. Only one of delete-key or
12+
delete-docker-cache can be specified at a time.
13+
required: false
14+
delete-docker-cache:
15+
description: |
16+
Delete the Docker build cache (dockerfile type) for the current repository.
17+
This uses the repository name (org/repo) as the key. Only one of delete-key
18+
or delete-docker-cache can be specified at a time.
19+
required: false
1320
runs:
1421
using: node24
1522
main: dist/main.bundle.mjs

dist/main.bundle.mjs

Lines changed: 135 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"prettier": "^3.6.2",
2222
"prettier-plugin-organize-imports": "^4.3.0",
2323
"rollup": "^4.50.0",
24+
"tslib": "^2.8.1",
2425
"typescript": "^5.9.2",
2526
"typescript-eslint": "^8.42.0",
2627
"vitest": "^3.1.4"

0 commit comments

Comments
 (0)