98
98
token : ${{ secrets.token }}
99
99
- name : Create deployment branch
100
100
run : |
101
- COMMIT=$(git rev-parse HEAD)
102
- git checkout -b "auto-deploy-$COMMIT"
101
+ git checkout -b "auto-deploy-${{ github.sha }}"
103
102
- name : Update deployments
104
103
run : |
105
104
echo '${{ steps.discover.outputs.json }}' > /tmp/updates.json
@@ -110,6 +109,14 @@ jobs:
110
109
cue fmt --simplify $(git diff --name-only)
111
110
- name : Run diff
112
111
run : git --no-pager diff
112
+ - name : Commit changes
113
+ run : |
114
+ git config --global user.email "[email protected] "
115
+ git config --global user.name "catalyst-cibot"
116
+
117
+ git add .
118
+ git commit -m "chore: auto-deploy from ${{ github.event.repository.name }}"
119
+ git push origin "auto-deploy-${{ github.sha }}"
113
120
- name : Sign commit hash
114
121
id : sign
115
122
run : |
@@ -118,21 +125,12 @@ jobs:
118
125
SIG=$(updater signing sign -k /tmp/privkey "$COMMIT")
119
126
rm /tmp/privkey
120
127
128
+ echo "GIT COMMIT: $COMMIT"
129
+
121
130
echo "signature=${SIG}" >> $GITHUB_OUTPUT
122
131
- name : Create PR
123
132
run : |
124
133
BODY="BEGIN-AUTO-DEPLOY-SIGNATURE:${{ steps.sign.outputs.signature }}:END-AUTO-DEPLOY-SIGNATURE"
125
- COMMIT=$(git rev-parse HEAD)
126
-
127
- echo "GIT COMMIT: $COMMIT"
128
- echo "GITHUB COMMIT: ${{ github.sha }}"
129
-
130
- git config --global user.email "[email protected] "
131
- git config --global user.name "catalyst-cibot"
132
-
133
- git add .
134
- git commit -m "chore: auto-deploy from ${{ github.event.repository.name }}"
135
- git push origin "auto-deploy-$COMMIT"
136
134
gh pr create --title "chore: auto-deploy from ${{ github.event.repository.name }}" --body "$BODY"
137
135
env :
138
136
GITHUB_TOKEN : ${{ secrets.token }}
0 commit comments