Skip to content

Commit c3cdfe1

Browse files
authored
Fix the publish workflow steps (#568)
1 parent 2ed6311 commit c3cdfe1

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

.github/workflows/tox.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,31 +124,25 @@ jobs:
124124
gh repo fork [email protected]:redhat-developer-demos/ansible-devspaces-demo.git --clone
125125
cd ansible-devspaces-demo
126126
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
128128
if: github.event_name == 'release' && github.event.action == 'published'
129129
env:
130130
GITHUB_TOKEN: ${{ secrets.ANSIBUDDY_BOT_PAT }}
131131
run: |
132132
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/"
134135
cd ansible-devspaces-demo
135136
git checkout -b update-devspaces-image-${{ github.event.release.tag_name }}
136137
export SHA=$(docker manifest inspect -v ghcr.io/ansible/ansible-devspaces:latest | jq -r '[.Descriptor.digest][0]')
137138
sed -i "s|image:.*|image: ghcr.io/ansible/ansible-devspaces@${{ env.SHA }}|" devfile.yaml
138139
git add devfile.yaml
139140
git commit -m "Update devspaces container image SHA"
140141
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
148142
gh pr create \
149143
--title "Update ansible-devspaces container image" \
150144
--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 }}'" \
152146
--base "main" \
153147
--repo "github.com/redhat-developer-demos/ansible-devspaces-demo"
154148

0 commit comments

Comments
 (0)