File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 1515  create-release-branch :
1616    runs-on : ubuntu-latest 
1717    permissions :
18-       contents : read 
18+       contents : write  #  Allow pushing the empty release branch 
1919      id-token : write  #  Required for OIDC token federation
2020    steps :
2121      - uses : DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80  #  v1.0.3
4545          BRANCH="release/${TAG%.0}.x" 
4646          echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT" 
4747
48-        - name : Checkout dd-trace-java 
48+        - name : Checkout dd-trace-java at tag  
4949        uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8  #  5.0.0
50+         with :
51+           ref : ${{ github.sha }} 
5052
5153      - name : Check if branch already exists 
5254        id : check-branch 
@@ -60,15 +62,11 @@ jobs:
6062            echo "Branch $BRANCH does not exist - proceeding with following steps" 
6163          fi 
6264
63-        - name : Push  empty release branch
65+        - name : Create and push  empty release branch
6466        if : steps.check-branch.outputs.creating_new_branch == 'true' 
65-         uses : DataDog/commit-headless@5a0f3876e0fbdd3a86b3e008acf4ec562db59eee  #  action/v2.0.1
66-         with :
67-           token : " ${{ steps.octo-sts.outputs.token }}" 
68-           branch : " ${{ steps.define-branch.outputs.branch }}" 
69-           head-sha : " ${{ github.sha }}" 
70-           create-branch : true 
71-           command : push 
67+         run : | 
68+           git checkout -b "${{ steps.define-branch.outputs.branch }}" 
69+           git push -u origin "${{ steps.define-branch.outputs.branch }}" 
7270
7371       - name : Define temp branch name 
7472        if : steps.check-branch.outputs.creating_new_branch == 'true' 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments