@@ -124,31 +124,25 @@ jobs:
124
124
gh repo fork [email protected] :redhat-developer-demos/ansible-devspaces-demo.git --clone
125
125
cd ansible-devspaces-demo
126
126
127
- - name : Create a new branch, update the file and push the branch
127
+ - name : Create a new branch, update the file, push the branch and create a pull request
128
128
if : github.event_name == 'release' && github.event.action == 'published'
129
129
env :
130
130
GITHUB_TOKEN : ${{ secrets.ANSIBUDDY_BOT_PAT }}
131
131
run : |
132
132
git config --global user.name "ansibuddy"
133
- git config --global user.email "[email protected] "
133
+ git config --global user.email "[email protected] "
134
+ git config --global url."https://${{ secrets.ANSIBUDDY_BOT_PAT }}@github.com/".insteadOf "https://github.com/"
134
135
cd ansible-devspaces-demo
135
136
git checkout -b update-devspaces-image-${{ github.event.release.tag_name }}
136
137
export SHA=$(docker manifest inspect -v ghcr.io/ansible/ansible-devspaces:latest | jq -r '[.Descriptor.digest][0]')
137
138
sed -i "s|image:.*|image: ghcr.io/ansible/ansible-devspaces@${{ env.SHA }}|" devfile.yaml
138
139
git add devfile.yaml
139
140
git commit -m "Update devspaces container image SHA"
140
141
git push origin update-devspaces-image-${{ github.event.release.tag_name }}
141
-
142
- - name : Create a pull request
143
- if : github.event_name == 'release' && github.event.action == 'published'
144
- env :
145
- GITHUB_TOKEN : ${{ secrets.ANSIBUDDY_BOT_PAT }}
146
- run : |
147
- cd ansible-devspaces-demo
148
142
gh pr create \
149
143
--title "Update ansible-devspaces container image" \
150
144
--body "This PR updates the ansible-devspaces container image SHA to the latest." \
151
- --head "update-devspaces-image-'${{ github.event.release.tag_name }}'" \
145
+ --head "ansibuddy: update-devspaces-image-'${{ github.event.release.tag_name }}'" \
152
146
--base "main" \
153
147
--repo "github.com/redhat-developer-demos/ansible-devspaces-demo"
154
148
0 commit comments