generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 106
Add new workflow for detecting changes in dot org #854
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
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
05b8278
feat: Add new workflow for detecting changes in dot org
lamATnginx cb07a77
Refactor to use a new dep for making PR
lamATnginx 529f2ae
Use better change comparision command to detect changes
lamATnginx beb53c9
Merge branch 'main' into dot-org-changes
TasoOneAsia 4888cb5
Merge branch 'main' into dot-org-changes
ADubhlaoich 89bbff5
Added paths to git add the generated files + yaml
lamATnginx 2764055
Merge branch 'main' into dot-org-changes
ADubhlaoich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Detect changes in documentation within nginx/nginx.org | ||
|
||
on: | ||
schedule: | ||
- cron: "0 */23 * * *" | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
issues: write | ||
|
||
jobs: | ||
detect-changes: | ||
name: Detect changes in 'en' docs of nginx/nginx.org | ||
runs-on: ubuntu-latest | ||
outputs: | ||
IS_CHANGES_DETECTED: ${{ steps.check_changes.outputs.changed }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Clone the nginx/nginx-org repository | ||
run: | | ||
git clone --depth=2 https://github.com/nginx/nginx.org.git dot-org-repo | ||
- name: Check for changes in xml/en folder | ||
id: check_changes | ||
run: | | ||
cd dot-org-repo | ||
commit1=$(git rev-parse HEAD) | ||
commit2=$(git rev-parse HEAD^) | ||
|
||
if git diff --name-only $commit2 $commit1 | grep '^xml/en/'; then | ||
echo "Changes detected in /en" | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "No changes in /en" | ||
echo "changed=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Execute make target 'make hugo-md' to generate markdown | ||
if: steps.check_changes.outputs.changed == 'true' | ||
run: | | ||
cd dot-org-repo | ||
make module-markdown | ||
- name: Create PR | ||
uses: peter-evans/create-pull-request@v7 | ||
if: steps.check_changes.outputs.changed == 'true' | ||
with: | ||
commit-message: "chore: Update nginx plus module reference from detected changes in nginx/nginx.org" | ||
labels: product/nginx-plus, dependencies, module-reference | ||
base: main | ||
branch: update-nginx-module-ref | ||
title: 'NGINX Plus - Module Ref: Update content for content/nginx due to detected changes' | ||
body: | | ||
### Proposed Changes | ||
Updated NGINX Plus docs. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.