Skip to content

Commit f0ff9b6

Browse files
fix: node actions copy to container (#230)
* close write end instead of read end of pipe
1 parent bb06721 commit f0ff9b6

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

.github/testworkflows/container-matrix.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ jobs:
66
matrix:
77
test: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]
88
runs-on: [self-hosted]
9-
container: ubuntu:latest
9+
container: node:latest
1010
steps:
11-
- run: echo Hello World
11+
- uses: actions/github-script@v7
12+
with:
13+
script: |
14+
console.log('Hello from NodeJS Actions in a container!');
15+
github-token: none
16+
- run: echo Hello World

.github/testworkflows/matrix.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ jobs:
77
test: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]
88
runs-on: [self-hosted]
99
steps:
10+
- uses: actions/github-script@v7
11+
with:
12+
script: |
13+
console.log('Hello from NodeJS Actions!');
14+
github-token: none
1015
- run: echo Hello World

actionsdotnetactcompat/action_cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func (cache *ActionCacheBase) GetTarArchive(ctx context.Context, cacheDir, sha,
3535
pr, pw := io.Pipe()
3636
cleanIncludePrefix := path.Clean(includePrefix)
3737
go func() {
38-
defer func() { _ = pr.Close() }()
38+
defer func() { _ = pw.Close() }()
3939
writer := tar.NewWriter(pw)
4040
defer func() { _ = writer.Close() }()
4141
reader, err := os.Open(cache.mapping[cacheDir+"@"+sha])

0 commit comments

Comments
 (0)