File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,17 @@ jobs:
117
117
docker push "ghcr.io/ansible/ansible-devspaces:latest"
118
118
119
119
- name : Fork and Clone the target repository
120
+ if : github.event_name == 'release' && github.event.action == 'published'
120
121
env :
121
122
GITHUB_TOKEN : ${{ secrets.ANSIBUDDY_BOT_PAT }}
122
123
run : |
123
124
gh repo fork [email protected] :redhat-developer-demos/ansible-devspaces-demo.git --clone
124
125
cd ansible-devspaces-demo
125
126
126
127
- name : Create a new branch, update the file and push the branch
128
+ if : github.event_name == 'release' && github.event.action == 'published'
127
129
run : |
130
+ cd ansible-devspaces-demo
128
131
git checkout -b update-devspaces-image-${{ github.event.release.tag_name }}
129
132
export SHA=$(docker manifest inspect -v ghcr.io/ansible/ansible-devspaces:latest | jq -r '[.Descriptor.digest][0]')
130
133
sed -i "s|image:.*|image: ghcr.io/ansible/ansible-devspaces@${{ env.SHA }}|" devfile.yaml
@@ -133,9 +136,11 @@ jobs:
133
136
git push origin update-devspaces-image-${{ github.event.release.tag_name }}
134
137
135
138
- name : Create a pull request
139
+ if : github.event_name == 'release' && github.event.action == 'published'
136
140
env :
137
141
GITHUB_TOKEN : ${{ secrets.ANSIBUDDY_BOT_PAT }}
138
142
run : |
143
+ cd ansible-devspaces-demo
139
144
gh pr create \
140
145
--title "Update ansible-devspaces container image" \
141
146
--body "This PR updates the ansible-devspaces container image SHA to the latest." \
You can’t perform that action at this time.
0 commit comments