-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Make the manage push automatical.
Instead of creating pull request that need to be merged, directly push the changes into main branch. Signed-off-by: Ales Musil <[email protected]>
- Loading branch information
Showing
1 changed file
with
17 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -2,6 +2,9 @@ name: Rebuild dist-docs | |
|
||
on: | ||
workflow_dispatch: | ||
# Build every week on Monday 00:00 | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
|
||
jobs: | ||
build-linux: | ||
|
@@ -10,16 +13,12 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
max-parallel: 1 | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- branch: main | ||
- branch: branch-22.03 | ||
- branch: branch-22.12 | ||
- branch: branch-23.03 | ||
- branch: branch-23.06 | ||
- branch: branch-23.09 | ||
- branch: branch-24.03 | ||
- branch: branch-24.09 | ||
|
||
steps: | ||
- name: install dependencies | ||
|
@@ -28,6 +27,7 @@ jobs: | |
- name: checkout ovn-website | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
path: 'ovn-website' | ||
ref: 'main' | ||
|
||
|
@@ -76,24 +76,18 @@ jobs: | |
tar xzvf /tmp/dist-docs.tgz --strip-components=1 -C ${DOCS_DIR} | ||
working-directory: ovn-website/src/static/support | ||
|
||
- name: pull-request for updated dist-docs | ||
id: pull_request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
path: ovn-website | ||
commit-message: | | ||
dist-docs: Update OVN ${{ matrix.branch }} manpages | ||
committer: github-actions <[email protected]> | ||
author: github-actions <[email protected]> | ||
branch: dist-docs-${{ matrix.branch }} | ||
title: Pulling dist-docs from OVN ${{ matrix.branch }} | ||
body: Automated changes to pull latest dist-docs from OVN ${{ matrix.branch }} | ||
|
||
- name: pull-request info | ||
if: ${{ success() }} | ||
- name: push updated dist-docs | ||
run: | | ||
echo "Pull request number: ${{ steps.pull_request.outputs.pull-request-number }}" | ||
echo "Pull request url: ${{ steps.pull_request.outputs.pull-request-url }}" | ||
if ! git diff --quiet --exit-code; then | ||
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
git add src/static/support | ||
git commit -m "Update OVN ${{ matrix.branch }} manpages" | ||
#git push | ||
else | ||
echo "No changes needed for ${{ matrix.branch }} manpages" | ||
fi | ||
working-directory: ovn-website | ||
|
||
- name: copy logs on failure | ||
if: failure() || cancelled() | ||
|