Skip to content

Initial (GHA) Workflow for creating the Porting Guide #121

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 59 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
1980cd4
Adds intial workflow for Porting Guide PR
anweshadas Jul 8, 2023
a363078
Fixes the directory for the ansible documentation checkout
anweshadas Jul 8, 2023
202fbcc
Fixes the directory for the new branch
anweshadas Jul 8, 2023
bd4c91c
Fixes the EOF error with qouting
anweshadas Jul 8, 2023
d247a52
Add steps to check what is there inside a directory
anweshadas Jul 8, 2023
a95a728
Edits the tar command
anweshadas Jul 8, 2023
dff68af
Fixes ansible versioning for Porting Guide
anweshadas Jul 8, 2023
ce1f9fe
Fixes tar command for debuging
anweshadas Jul 8, 2023
7d67396
Fixes directory for PR
anweshadas Jul 8, 2023
9bd4c23
Fixes the names of the steps
anweshadas Jul 8, 2023
deb3531
Updates to the correct barnch
anweshadas Jul 14, 2023
57f47ad
Fixes changes based on the review feedback
anweshadas Aug 3, 2023
7ac05fb
Cleans git and github steps for better security
anweshadas Dec 4, 2023
e97b436
Edits to get Porting guide from ansible-build-data git repo
anweshadas Dec 19, 2023
e3b7fb2
Checks out correct repo
anweshadas Dec 19, 2023
fbab373
Edits to retrive major version from user input
anweshadas Mar 25, 2024
bb9ea84
Removes redundant quote from PR text
anweshadas Mar 28, 2024
39271bf
Reformts abd general cleanup
anweshadas Mar 28, 2024
e452fcb
Edits to working-directory
anweshadas Mar 28, 2024
e50cb2c
Updates based on feedback
anweshadas May 14, 2024
2ce8b1a
Update .github/workflows/docsbuild-release.yaml
anweshadas May 15, 2024
6dedaf3
release porting guide workflow
oraNod May 16, 2024
e9eb9f3
use a reusable workflow
oraNod May 16, 2024
63bb7a8
use plain git cmds instead of gha
oraNod May 17, 2024
e17ffdb
More updates based on review feedback
anweshadas Jun 27, 2025
5604b9a
Updates based on latest review feedback
anweshadas Jun 27, 2025
2c52837
Update .github/workflows/reusable-porting-guide.yml
anweshadas Jun 29, 2025
287d93f
Update .github/workflows/reusable-porting-guide.yml
anweshadas Jun 29, 2025
2d4bc2e
Update .github/workflows/reusable-porting-guide.yml
anweshadas Jun 29, 2025
4663368
Update .github/workflows/reusable-porting-guide.yml
anweshadas Jun 29, 2025
c859aba
Update .github/workflows/release-porting-guide.yml
anweshadas Jun 29, 2025
5dd2143
Update .github/workflows/release-porting-guide.yml
anweshadas Jun 29, 2025
4b85023
Uses single workflow file
anweshadas Jun 30, 2025
0802592
Update .github/workflows/release-porting-guide.yml
anweshadas Jun 30, 2025
e10dd31
Update .github/workflows/release-porting-guide.yml
anweshadas Jun 30, 2025
73aa036
Update .github/workflows/release-porting-guide.yml
anweshadas Jun 30, 2025
39d9909
Creates draft PR
anweshadas Jul 2, 2025
e43ac6a
Updates workflow to comment on the new PR
anweshadas Jul 4, 2025
1aa44a0
Creates PR against devel branch
anweshadas Jul 4, 2025
f9cb244
Adds ready_for_review PR type to pull_request event
anweshadas Jul 5, 2025
b75dde8
Updates based on (Felix's) feedback
anweshadas Jul 7, 2025
0dfe040
Update .github/workflows/ci.yaml
anweshadas Jul 7, 2025
ef97cf8
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 7, 2025
d16815e
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 7, 2025
63842c7
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 7, 2025
a6b9539
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 7, 2025
5574ba8
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 7, 2025
547c1ab
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 7, 2025
f2132d9
Adds types to pull_request_target
anweshadas Jul 7, 2025
d037e94
Removes unused identifier from the workflow step
anweshadas Jul 7, 2025
931af69
Updates all missing env variables
anweshadas Jul 8, 2025
59e0300
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 9, 2025
a30afab
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 9, 2025
cdce575
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 9, 2025
fcef4c8
Updates ANSIBLE_VERSION_MAJOR env variable creation
anweshadas Jul 9, 2025
23f6b28
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 9, 2025
f6058b7
Removes id
anweshadas Jul 9, 2025
2d6c9c9
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 13, 2025
fc40546
Update .github/workflows/release-porting-guide.yml
anweshadas Jul 13, 2025
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ name: Ansible Docsite CI
- 'patchback/**'
- 'pip-compile/**'
pull_request:
types:
- opened # default
- synchronize # default
- reopened # default
- ready_for_review # used in PRs created from GitHub Actions workflows
workflow_dispatch:

jobs:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

"on":
pull_request_target:
types:
- opened # default
- synchronize # default
- reopened # default
- ready_for_review # used in PRs created from GitHub Actions workflows
branches:
- devel
- "stable-*"
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/release-porting-guide.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
name: Ansible porting guide creation
on:
workflow_dispatch:
inputs:
ansible-build-data-branch:
description: >-
Release Branch name from the Ansible Build data PR.
(e.g. `refs/pull/1/merge`)
required: true
ansible-version:
description: >-
Exact release version. For example, 12.1.0
required: true

jobs:
upload-porting-guide:
name: Extract the porting guide
runs-on: ubuntu-latest
env:
GIT_BRANCH: "release/porting-guide-${{ inputs.ansible-version }}"
ANSIBLE_VERSION_FULL: ${{ inputs.ansible-version }}
CI_COMMIT_MESSAGE: >-
Add the Ansible community ${{ inputs.ansible-version }} porting guide

steps:
- name: Extract the major version
run: echo "ANSIBLE_VERSION_MAJOR=${ANSIBLE_VERSION_FULL%%.*}" >> "${GITHUB_ENV}"
shell: bash --noprofile --norc -O extglob -eEuo pipefail {0}

- name: Check out this repo src
uses: actions/checkout@v4
- name: Check out ansible-build-data
uses: actions/checkout@v4
with:
repository: ansible-community/ansible-build-data
ref: ${{ inputs.ansible-build-data-branch }}
path: ansible-build-data

- name: Copy the RST file to the correct path
run: >-
cp -v
"ansible-build-data/${ANSIBLE_VERSION_MAJOR}/porting_guide_${ANSIBLE_VERSION_MAJOR}.rst"
docs/docsite/rst/porting_guides/

- name: Set up git
run: |
git switch --create "${GIT_BRANCH}"
ACTOR_NAME="$(curl -s https://api.github.com/users/"${GITHUB_ACTOR}" | jq --raw-output '.name // .login')"
git config --global user.name "${ACTOR_NAME}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"

- name: Add the porting guide
run: git add docs/docsite/rst/porting_guides/"porting_guide_${ANSIBLE_VERSION_MAJOR}.rst"

- name: Commit the porting guide
run: >-
git diff-index --quiet HEAD ||
git commit -m "${CI_COMMIT_MESSAGE}"

- name: Push to the repo
run: git push origin "${GIT_BRANCH}"

- name: Create the porting guide PR as draft
env:
GITHUB_TOKEN: ${{ github.token }}
PR_BODY_MESSAGE: |-
##### SUMMARY

This is a draft PR. Please mark the PR as ready for review to trigger PR checks.

##### ISSUE TYPE

- Docs Pull Request

##### COMPONENT NAME

docs/docsite/rst/porting_guides/porting_guide_${{ env.ANSIBLE_VERSION_MAJOR }}.rst
run: >-
gh pr create
--draft
--base devel
--head "${GIT_BRANCH}"
--title "${CI_COMMIT_MESSAGE}"
--body "${PR_BODY_MESSAGE}"