8000 Fix the publish workflow steps by shatakshiiii · Pull Request #568 · ansible/ansible-dev-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix the publish workflow steps #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,31 +124,25 @@ jobs:
gh repo fork git@github.com:redhat-developer-demos/ansible-devspaces-demo.git --clone
cd ansible-devspaces-demo

- name: Create a new branch, update the file and push the branch
- name: Create a new branch, update the file, push the branch and create a pull request
if: github.event_name == 'release' && github.event.action == 'published'
env:
GITHUB_TOKEN: ${{ secrets.ANSIBUDDY_BOT_PAT }}
run: |
git config --global user.name "ansibuddy"
git config --global user.email "ansible-devtools@redhat.com"
git config --global user.email "ansibuddy@users.noreply.github.com"
git config --global url."https://${{ secrets.ANSIBUDDY_BOT_PAT }}@github.com/".insteadOf "https://github.com/"
cd ansible-devspaces-demo
git checkout -b update-devspaces-image-${{ github.event.release.tag_name }}
export SHA=$(docker manifest inspect -v ghcr.io/ansible/ansible-devspaces:latest | jq -r '[.Descriptor.digest][0]')
sed -i "s|image:.*|image: ghcr.io/ansible/ansible-devspaces@${{ env.SHA }}|" devfile.yaml
git add devfile.yaml
git commit -m "Update devspaces container image SHA"
git push origin update-devspaces-image-${{ github.event.release.tag_name }}

- name: Create a pull request
if: github.event_name == 'release' && github.event.action == 'published'
env:
GITHUB_TOKEN: ${{ secrets.ANSIBUDDY_BOT_PAT }}
run: |
cd ansible-devspaces-demo
gh pr create \
--title "Update ansible-devspaces container image" \
--body "This PR updates the ansible-devspaces container image SHA to the latest." \
--head "update-devspaces-image-'${{ github.event.release.tag_name }}'" \
--head "ansibuddy:update-devspaces-image-'${{ github.event.release.tag_name }}'" \
--base "main" \
--repo "github.com/redhat-developer-demos/ansible-devspaces-demo"

Expand Down
Loading
0