Skip to content

Commit ccbc653

Browse files
committed
fix: Locked sha is now given priority
1 parent 05bf29f commit ccbc653

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/cli/install/index.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ export async function install(args: string[]) {
6868
})();
6969

7070
// get commit by tag name
71-
const sha = await getCommit(
72-
parsedAction.owner,
73-
parsedAction.repo,
74-
tagName,
75-
);
71+
const sha = await (async () => {
72+
const lockedSha =
73+
actionsLockJson.actions[`${parsedAction.fullName}@${tagName}`];
74+
if (lockedSha != null) return lockedSha;
75+
return await getCommit(parsedAction.owner, parsedAction.repo, tagName);
76+
})();
7677

7778
// update actions.json and actions-lock.json
7879
actionsJson[parsedAction.fullName] = tagName;

0 commit comments

Comments
 (0)