From 5b808fdcc2b69b1f39da7f11d47e504ff82575e3 Mon Sep 17 00:00:00 2001 From: Akshay Patidar Date: Tue, 6 Jun 2023 18:29:28 +0530 Subject: [PATCH 1/2] chore: add release action (#196) Signed-off-by: Akshay Patidar --- .github/workflows/release.yaml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d369bb21..f021bc8b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -62,3 +62,39 @@ jobs: - SHA Checksum: `${{ steps.sha256.outputs.linux_amd64 }}` token: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout create-homebrew-release action + uses: actions/checkout@v3 + with: + repository: dream11/create-homebrew-release + path: homebrew-release + token: ${{ secrets.COMMIT_ACCESS_TOKEN }} + ref: "v1.0.0" + + - name: Create homebrew release + id: homebrew_release + uses: ./homebrew-release/ + with: + homebrew-tap: dream11/homebrew-tools + formula_directory: formula + description: "Interface for service definitions & deployments into self-managed environments" + formula: odin + version: ${{ steps.commit.outputs.version }} + homepage: https://github.com/dream11/odin + github-token: ${{ secrets.COMMIT_ACCESS_TOKEN }} + github-username: dream11bot + github-email: actions@dream11.com + darwin-amd64-url: https://github.com/dream11/odin/releases/download/${{ steps.commit.outputs.version }}/odin_darwin_amd64.tar.gz + darwin-amd64-sha: ${{ steps.sha256.outputs.darwin_amd64 }} + darwin-arm64-url: https://github.com/dream11/odin/releases/download/${{ steps.commit.outputs.version }}/odin_darwin_arm64.tar.gz + darwin-arm64-sha: ${{ steps.sha256.outputs.darwin_arm64 }} + linux-amd64-url: https://github.com/dream11/odin/releases/download/${{ steps.commit.outputs.version }}/odin_linux_amd64.tar.gz + linux-amd64-url: ${{ steps.sha256.outputs.linux_amd64 }} + merge-pr: false + + - name: Comment homebrew-tools generated PR + uses: mshick/add-pr-comment@v2 + with: + message: | + ## Yay! Homebrew tools PR created. URL: ${{ steps.homebrew_release.outputs.pr }} :smile: + repo-token: ${{ secrets.COMMIT_ACCESS_TOKEN }} From 807f699dd7ae9e2a3048efce274f43ff0873b4bc Mon Sep 17 00:00:00 2001 From: dhavalmehta07 <93577605+dhavalmehta07@users.noreply.github.com> Date: Fri, 22 Dec 2023 00:58:39 +0530 Subject: [PATCH 2/2] Feat/gcp (#208) * Multi account support --- api/environment/env.go | 2 +- app/app.go | 2 +- internal/command/commands/env.go | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/api/environment/env.go b/api/environment/env.go index 7684e3af..6ce515af 100644 --- a/api/environment/env.go +++ b/api/environment/env.go @@ -11,7 +11,7 @@ type Env struct { EnvType string `yaml:"envType,omitempty" json:"envType,omitempty"` State string `yaml:"state,omitempty" json:"state,omitempty"` DeletionTime string `yaml:"autoDeletionTime,omitempty" json:"autoDeletionTime,omitempty"` - Account string `yaml:"cloudProviderAccount,omitempty" json:"cloudProviderAccount,omitempty"` + Account []string `yaml:"cloudProviderAccounts,omitempty" json:"cloudProviderAccounts,omitempty"` CreatedBy string `yaml:"createdBy,omitempty" json:"createdBy,omitempty"` UpdatedBy string `yaml:"updatedBy,omitempty" json:"updatedBy,omitempty"` CreatedAt string `yaml:"createdAt,omitempty" json:"createdAt,omitempty"` diff --git a/app/app.go b/app/app.go index 280d84db..f3e0a569 100644 --- a/app/app.go +++ b/app/app.go @@ -8,5 +8,5 @@ type application struct { // App (Application) interface var App application = application{ Name: "odin", - Version: "1.3.1", + Version: "1.3.2", } diff --git a/internal/command/commands/env.go b/internal/command/commands/env.go index adf79801..b273a922 100644 --- a/internal/command/commands/env.go +++ b/internal/command/commands/env.go @@ -24,6 +24,13 @@ type Env command const ENV_NAME_KEY = "EnvName" +func splitProviderAccount(providerAccount string) []string { + if providerAccount == "" { + return nil + } + return strings.Split(providerAccount, ",") +} + // Run : implements the actual functionality of the command func (e *Env) Run(args []string) int { // Define flag set @@ -62,7 +69,7 @@ func (e *Env) Run(args []string) int { } envConfig := environment.Env{ EnvType: *env, - Account: *providerAccount, + Account: splitProviderAccount(*providerAccount), Name: *name, }