-
Notifications
You must be signed in to change notification settings - Fork 23
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 the branch where the job was triggered. Signed-off-by: Ales Musil <[email protected]>
- Loading branch information
Showing
1 changed file
with
19 additions
and
20 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,24 +2,28 @@ name: Rebuild dist-docs | |
|
||
on: | ||
workflow_dispatch: | ||
# Build every week on Monday 00:00 | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
|
||
jobs: | ||
build-linux: | ||
if: github.repository_owner == 'ovn-org' | ||
name: linux ${{ join(matrix.*, ' ') }} | ||
container: fedora:latest | ||
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,8 +32,9 @@ jobs: | |
- name: checkout ovn-website | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
path: 'ovn-website' | ||
ref: 'main' | ||
ref: ${{ github.ref }} | ||
|
||
- name: checkout OVN | ||
uses: actions/checkout@v4 | ||
|
@@ -76,24 +81,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 [ -n "$(git status --porcelain -unormal)" ]; 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() | ||
|