Skip to content

Commit

Permalink
feat: init values repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jehoszafat Zimnowoda committed Nov 28, 2023
1 parent 488047f commit 76f2290
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/tasks/gitea/gitea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,27 @@ export default async function main(): Promise<void> {
name: otomiValuesRepoName,
_private: true,
}
const valuesRepoOption: CreateRepoOption = {
...new CreateRepoOption(),
autoInit: true,
name: otomiValuesRepoName,
_private: true,
}
const chartsRepoOption: CreateRepoOption = {
...new CreateRepoOption(),
autoInit: false,
name: 'charts',
_private: true,
}

const existingRepos = await doApiCall(errors, `Getting all repos in org "${orgName}"`, () =>
orgApi.orgListRepos(orgName),
)

// create main org repo: otomi/values
await upsertRepo(existingTeams, existingRepos, orgApi, repoApi, repoOption)
await upsertRepo(existingTeams, existingRepos, orgApi, repoApi, valuesRepoOption)
// create otomi/charts repo for auto image updates
await upsertRepo(existingTeams, existingRepos, orgApi, repoApi, { ...repoOption, name: 'charts' })
await upsertRepo(existingTeams, existingRepos, orgApi, repoApi, chartsRepoOption)

// add repo: otomi/values to the team: otomi-viewer
await doApiCall(
Expand Down

0 comments on commit 76f2290

Please sign in to comment.