Skip to content

Commit

Permalink
fix: use sudo to chmod agent (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
fallard84 authored Jun 27, 2024
1 parent 59890e3 commit e6a8c1a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/bullfrog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ jobs:
run: |
git diff --exit-code --quiet action/dist || (echo "action/dist has changed, please commit the changes" && exit 1)
test-load-agent:
needs: build
runs-on: ubuntu-22.04
timeout-minutes: 2

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
with:
name: build-artifacts

- name: Enable egress filtering
uses: ./

test-audit:
needs: build
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion action/dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19130,7 +19130,7 @@ async function startAgent({
const agentOut = (await import_promises3.default.open(agentLogFilepath, "a")).fd;
console.log(`Starting agent from ${agentPath}`);
console.time("Agent startup time");
await exec(`chmod +x ${agentPath}`);
await exec(`sudo chmod +x ${agentPath}`);
(0, import_node_child_process.spawn)(
"sudo",
[agentPath, "--dns-policy", dnsPolicy, "--egress-policy", egressPolicy],
Expand Down
4 changes: 2 additions & 2 deletions action/dist/main.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async function startAgent({
console.time("Agent startup time");

// make agent executable
await exec(`chmod +x ${agentPath}`);
await exec(`sudo chmod +x ${agentPath}`);

spawn(
"sudo",
Expand Down

0 comments on commit e6a8c1a

Please sign in to comment.