Skip to content

Commit

Permalink
Switch manifest installation from "master" to "main" branch (#65)
Browse files Browse the repository at this point in the history
* switch from master to main branch

* Update README.md
  • Loading branch information
maxim-lobanov authored Jul 20, 2020
1 parent 1616116 commit d0c5def
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ The V2 offers:
- stable input
- Bug Fixes (including issues around version matching and semver)

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).

Matching by semver spec:
```yaml
steps:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5034,7 +5034,7 @@ exports.extractGoArchive = extractGoArchive;
function getInfoFromManifest(versionSpec, stable, auth) {
return __awaiter(this, void 0, void 0, function* () {
let info = null;
const releases = yield tc.getManifestFromRepo('actions', 'go-versions', auth);
const releases = yield tc.getManifestFromRepo('actions', 'go-versions', auth, "main");
core.info(`matching ${versionSpec}...`);
const rel = yield tc.findFromManifest(versionSpec, stable, releases);
if (rel && rel.files.length > 0) {
Expand Down
7 changes: 6 additions & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ export async function getInfoFromManifest(
auth: string | undefined
): Promise<IGoVersionInfo | null> {
let info: IGoVersionInfo | null = null;
const releases = await tc.getManifestFromRepo('actions', 'go-versions', auth);
const releases = await tc.getManifestFromRepo(
'actions',
'go-versions',
auth,
'main'
);
core.info(`matching ${versionSpec}...`);
const rel = await tc.findFromManifest(versionSpec, stable, releases);

Expand Down

0 comments on commit d0c5def

Please sign in to comment.