| 1234567891011121314151617181920212223242526272829 |
- package actions
- import (
- "fmt"
- )
- const updateAppActionName = "porter-dev/porter-update-action"
- func getCheckoutCodeStep() GithubActionYAMLStep {
- return GithubActionYAMLStep{
- Name: "Checkout code",
- Uses: "actions/checkout@v2.3.4",
- }
- }
- func getUpdateAppStep(serverURL, porterTokenSecretName string, projectID uint, clusterID uint, appName string, actionVersion string) GithubActionYAMLStep {
- return GithubActionYAMLStep{
- Name: "Update Porter App",
- Uses: fmt.Sprintf("%s@%s", updateAppActionName, actionVersion),
- With: map[string]string{
- "app": appName,
- "cluster": fmt.Sprintf("%d", clusterID),
- "host": serverURL,
- "project": fmt.Sprintf("%d", projectID),
- "token": fmt.Sprintf("${{ secrets.%s }}", porterTokenSecretName),
- },
- Timeout: 20,
- }
- }
|