Skip to content

Commit d0c5def

Browse files
Switch manifest installation from "master" to "main" branch (#65)
* switch from master to main branch * Update README.md
1 parent 1616116 commit d0c5def

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The V2 offers:
1919
- stable input
2020
- Bug Fixes (including issues around version matching and semver)
2121

22+
It will first check the local cache for a version match. If version is not found locally, It will pull it from `main` branch of [go-versions](https://github.com/actions/go-versions/blob/main/versions-manifest.json) repository and on miss or failure, it will fall back to the previous behavior of download directly from [go dist](https://storage.googleapis.com/golang).
23+
2224
Matching by semver spec:
2325
```yaml
2426
steps:

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5034,7 +5034,7 @@ exports.extractGoArchive = extractGoArchive;
50345034
function getInfoFromManifest(versionSpec, stable, auth) {
50355035
return __awaiter(this, void 0, void 0, function* () {
50365036
let info = null;
5037-
const releases = yield tc.getManifestFromRepo('actions', 'go-versions', auth);
5037+
const releases = yield tc.getManifestFromRepo('actions', 'go-versions', auth, "main");
50385038
core.info(`matching ${versionSpec}...`);
50395039
const rel = yield tc.findFromManifest(versionSpec, stable, releases);
50405040
if (rel && rel.files.length > 0) {

src/installer.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ export async function getInfoFromManifest(
140140
auth: string | undefined
141141
): Promise<IGoVersionInfo | null> {
142142
let info: IGoVersionInfo | null = null;
143-
const releases = await tc.getManifestFromRepo('actions', 'go-versions', auth);
143+
const releases = await tc.getManifestFromRepo(
144+
'actions',
145+
'go-versions',
146+
auth,
147+
'main'
148+
);
144149
core.info(`matching ${versionSpec}...`);
145150
const rel = await tc.findFromManifest(versionSpec, stable, releases);
146151

0 commit comments

Comments
 (0)