Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hulk510 committed Jan 17, 2024
1 parent d6224b7 commit 82265d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const deleteRefActionsCache = async (
}
)

// https://github.com/octokit/octokit.js/tree/b831b6bce43d56b97e25a996e1b43525486d8bd3?tab=readme-ov-file#pagination
for await (const { data: cacheList } of iterator) {
for (const { id: cacheId } of cacheList) {
if (!cacheId) continue
Expand All @@ -39,8 +40,11 @@ export async function run(): Promise<void> {
// MEMO: git contextからheadRefは取得できなそう
const { repo, ref } = github.context

core.info(`repo: ${github.context.payload.pull_request}`)
// const eventPath = process.env.GITHUB_EVENT_PATH

const headRef = process.env.GITHUB_HEAD_REF
core.debug(`headRef: ${headRef}`)
core.info(`headRef: ${headRef}`)

if (headRef) {
deleteRefActionsCache(octokit, repo, headRef)
Expand Down

0 comments on commit 82265d3

Please sign in to comment.