Skip to content

Commit

Permalink
Merge pull request #187 from jonico/patch-1
Browse files Browse the repository at this point in the history
Add Container ID detection for GitHub Actions
  • Loading branch information
oleg-nenashev authored Oct 4, 2019
2 parents cf1948e + c7f01c9 commit 815419f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ public String getContainerId() throws IOException {
if (group.length() < i+1+64) throw new IOException("Unexpected cgroup syntax "+group);
return group.substring(i+1, i+1+64);
}
if (group.startsWith("/actions_job/")) {
// 12:freezer:/actions_job/ddecc467e1fb3295425e663efb6531282c1c936f25a3eeb7bb64e7b0fc61a216
int i = group.lastIndexOf('/');
if (group.length() < i+1+64) throw new IOException("Unexpected cgroup syntax "+group);
return group.substring(i+1, i+1+64);
}

return null;
}
Expand Down

0 comments on commit 815419f

Please sign in to comment.