Alexander Belanger 5 lat temu
rodzic
commit
afc3c9a81d

+ 38 - 0
docker/nginx_remote.conf

@@ -0,0 +1,38 @@
+events {}
+http {
+    upstream api {
+        server localhost:8081;
+    }
+
+    upstream webpack {
+        server localhost:8082;
+    }
+
+    server {
+        listen 8080;
+        server_name localhost;
+
+        location /api/ {
+            proxy_pass http://api;
+            proxy_http_version 1.1;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection 'upgrade';
+            proxy_set_header Host $host;
+            proxy_cache_bypass $http_upgrade;
+            proxy_set_header   X-Forwarded-Host $server_name;
+        }
+
+        location / {
+            proxy_pass http://webpack;
+            proxy_pass_header Content-Security-Policy;
+            proxy_http_version 1.1;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection 'upgrade';
+            proxy_set_header Host $host;
+            proxy_cache_bypass $http_upgrade;
+            proxy_set_header   X-Forwarded-Host $server_name;
+        }
+    }
+
+    client_max_body_size 10M;
+}

+ 23 - 3
internal/integrations/ci/actions/actions.go

@@ -2,7 +2,6 @@ package actions
 
 import (
 	"context"
-	"fmt"
 
 	"github.com/google/go-github/v33/github"
 	"github.com/porter-dev/porter/internal/models"
@@ -41,6 +40,29 @@ func (g *GithubActions) Setup() error {
 	return nil
 }
 
+type GithubActionYAML struct {
+	On struct {
+		Push struct {
+			Branches []string `yaml:"branches"`
+		} `yaml:"push"`
+	} `yaml:"on"`
+
+	Name string `yaml:"name"`
+
+	Jobs map[string]struct {
+		RunsOn string `yaml:"runs-on"`
+		Steps  []struct {
+			Name string `yaml:"name"`
+			ID   string `yaml:"id"`
+			// TODO -- OTHER RELEVANT STUFF
+		} `yaml:"steps"`
+	} `yaml:"jobs"`
+}
+
+func (g *GithubActions) GetGithubActionYAML() (*github.Client, error) {
+	return nil, nil
+}
+
 func (g *GithubActions) getClient() (*github.Client, error) {
 	// get the oauth integration
 	oauthInt, err := g.Repo.OAuthIntegration.ReadOAuthIntegration(g.GitRepo.OAuthIntegrationID)
@@ -83,8 +105,6 @@ func (g *GithubActions) createGithubWebhookSecret(client *github.Client) error {
 		return err
 	}
 
-	fmt.Println("OUT IS", out)
-
 	encryptedSecret := &github.EncryptedSecret{
 		Name:           secretName,
 		KeyID:          *key.KeyID,