File tree 1 file changed +35
-1
lines changed
1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 5
5
workflow_call :
6
6
inputs :
7
7
ephemeral_env_branch :
8
- required : true
9
8
type : string
10
9
project :
11
10
type : string
14
13
type : boolean
15
14
sync_environment :
16
15
type : boolean
16
+ create_branch :
17
+ type : boolean
17
18
pull_request_number :
18
19
type : number
19
20
workflow_dispatch :
40
41
name : Check PR run
41
42
uses : ./.github/workflows/check-run.yml
42
43
44
+ create-branch :
45
+ name : Create Branch
46
+ if : ${{ inputs.create_branch }}
47
+ runs-on : ubuntu-24.04
48
+ needs : check-run
49
+ steps :
50
+ - name : Login to Azure - Prod Subscription
51
+ uses : Azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
52
+ with :
53
+ creds : ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
54
+
55
+ - name : Retrieve secrets
56
+ id : retrieve-secrets
57
+ uses : bitwarden/gh-actions/get-keyvault-secrets@main
58
+ with :
59
+ keyvault : ${{ env._KEY_VAULT }}
60
+ secrets : " github-pat-bitwarden-devops-bot-repo-scope,github-bitwarden-devops-bot-email"
61
+
62
+ - name : Checkout Ephemeral Environment Charts
63
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64
+ with :
65
+ repository : bitwarden/ephemeral-environments
66
+ token : ' ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}'
67
+
68
+ - name : Create Branch
69
+ env :
70
+ BRANCH_NAME : ee-${{ inputs.project }}-${{ inputs.pull_request_number }}
71
+ run : |
72
+ if ! git rev-parse --verify origin/${{ env.BRANCH_NAME }}; then
73
+ git checkout -b ${{ env.BRANCH_NAME }}
74
+ git push
75
+ fi
76
+
43
77
cleanup :
44
78
name : Cleanup config
45
79
if : ${{ inputs.cleanup_config }}
You can’t perform that action at this time.
0 commit comments