Skip to content

Commit

Permalink
dynamic holodeck ci instance name
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <shivaku@nvidia.com>
  • Loading branch information
shivakunv committed Dec 13, 2024
1 parent 3d43889 commit edcfd83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
name: End-to-end Tests

on:
workflow_run:
workflows: [Go]
pull_request:
types:
- completed
- opened
- synchronize
branches:
- ci-dynamicname
push:
branches:
- "pull-request/[0-9]+"
# - main
# - release-*
- ci-dynamicname

jobs:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Holodeck
uses: NVIDIA/holodeck@main
uses: NVIDIA/holodeck@ci-dynamicname
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions cmd/action/ci/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ func setCfgName(cfg *v1alpha1.Environment) {
}
// uid is unique for each run
uid := generateUID()

if cfg.Name != "" {
cfg.Name = fmt.Sprintf("%s-ci%s-%s-%s", cfg.Name, attempt, sha, uid)
cfg.Name = fmt.Sprintf("ci%s-%s-%s-%s", attempt, sha, uid, cfg.Name)
} else {
cfg.Name = fmt.Sprintf("ci%s-%s-%s", attempt, sha, uid)
actor := os.Getenv("GITHUB_ACTOR")
cfg.Name = fmt.Sprintf("ci%s-%s-%s-%s", attempt, sha, uid, actor)
}
}

Expand Down

0 comments on commit edcfd83

Please sign in to comment.