Skip to content

Commit

Permalink
fix: add back chmodr (#378)
Browse files Browse the repository at this point in the history
* fix: add back chmodr

* testing

* update ci test to check for chmod
  • Loading branch information
HarryGogonis committed Apr 11, 2024
1 parent a842a15 commit 8e3f88b
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 20 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ jobs:
- uses: actions/checkout@v4
- uses: ./
with:
uri: 'https://github.com/google/go-containerregistry/releases/download/v0.19.1/go-containerregistry_Linux_x86_64.tar.gz'
name: 'crane'
version: '0.19.1'
uri: 'https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64.tar.gz'
name: 'yq'
version: '4.43.1'
- run: |
which crane
which yq
- name: check file permissions
run: |
CHMOD=$(stat -c '%a' /opt/hostedtoolcache/yq/4.43.1/x64/yq.1)
echo $CHMOD
if [ "$CHMOD" != "755" ]; then exit 1; fi
- run: |
crane version
yq --version
123 changes: 113 additions & 10 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions dist/licenses.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/tool-cache": "^2.0.1"
"@actions/tool-cache": "^2.0.1",
"chmodr": "^1.2.0"
},
"devDependencies": {
"@types/chmodr": "^1.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.5",
"@typescript-eslint/parser": "^6.15.0",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as core from '@actions/core'
import * as exec from '@actions/exec'
import {chmod} from 'node:fs'
import chmodr from 'chmodr'
import {getConfig} from './config'
import {getTool} from './tool'

Expand All @@ -16,7 +16,7 @@ async function run(): Promise<void> {
})
} else {
core.info(`adding to path: ${tool}`)
chmod(tool, 0o0755, err => {
chmodr(tool, 0o0755, err => {
if (err) {
throw err
}
Expand Down

0 comments on commit 8e3f88b

Please sign in to comment.