Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-bell committed Jan 30, 2025
1 parent adfc75d commit 201fa71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
7 changes: 5 additions & 2 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.

9 changes: 7 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export async function run(): Promise<void> {
try {
//Get an OIDC token
const token = await core.getIDToken()
if (!token) {
throw new Error(
'Unable to get OIDC token. Is workflow permission configured correctly?'
)
}
const graderConfig = await createSubmission({
headers: {
Authorization: token
Expand All @@ -35,8 +40,8 @@ export async function run(): Promise<void> {
}
const fileStream = createWriteStream('grader.zip')
await finished(Readable.fromWeb(file.body).pipe(fileStream))
//Unzip the file
await exec('unzip', ['grader.zip', 'grader'])
//Unzip the file to the directory "grader"
await exec('unzip', ['grader.zip', '-d', 'grader'])

//Run the autograder
const cwd = process.cwd()
Expand Down

0 comments on commit 201fa71

Please sign in to comment.