Rebuild dist-docs #21
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
name: Rebuild dist-docs | |
on: | |
workflow_dispatch: | |
jobs: | |
build-linux: | |
name: linux ${{ join(matrix.*, ' ') }} | |
container: fedora:latest | |
runs-on: ubuntu-22.04 | |
strategy: | |
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 | |
steps: | |
- name: install dependencies | |
run: dnf install -y dnf-plugins-core ghostscript git man | |
- name: checkout ovn-website | |
uses: actions/checkout@v4 | |
with: | |
path: 'ovn-website' | |
ref: 'main' | |
- name: checkout OVN | |
uses: actions/checkout@v4 | |
with: | |
repository: 'ovn-org/ovn' | |
path: 'ovn' | |
ref: ${{ matrix.branch }} | |
submodules: recursive | |
- name: install build dependencies | |
run: | | |
sed -e 's/@VERSION@/0.0.1/' rhel/ovn-fedora.spec.in \ | |
> /tmp/ovn.spec | |
dnf builddep -y /tmp/ovn.spec | |
working-directory: ovn | |
- name: configure OvS | |
run: ./boot.sh && ./configure | |
working-directory: ovn/ovs | |
- name: make dist OvS | |
run: make -j4 dist | |
working-directory: ovn/ovs | |
- name: configure OVN | |
run: ./boot.sh && ./configure | |
working-directory: ovn | |
- name: make dist-docs OVN | |
run: make -j4 dist-docs | |
working-directory: ovn | |
- name: archive dist-docs | |
run: tar -czvf /tmp/dist-docs.tgz dist-docs | |
working-directory: ovn | |
- name: replace dist-docs content | |
if: ${{ success() }} | |
run: | | |
DOCS_DIR="dist-docs" | |
[ "${{ matrix.branch }}" == "main" ] || DOCS_DIR="${DOCS_DIR}-${{ matrix.branch }}" | |
rm -rf ${DOCS_DIR} | |
mkdir -v ${DOCS_DIR} | |
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() }} | |
run: | | |
echo "Pull request number: ${{ steps.pull_request.outputs.pull-request-number }}" | |
echo "Pull request url: ${{ steps.pull_request.outputs.pull-request-url }}" | |
- name: copy logs on failure | |
if: failure() || cancelled() | |
run: | | |
# upload-artifact doesn't work well enough with wildcards. | |
# So, we're just archiving everything here to avoid any issues. | |
mkdir logs | |
cp config.log ./logs/ | |
tar -czvf logs.tgz logs/ | |
working-directory: ovn | |
- name: upload logs on failure | |
if: failure() || cancelled() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-linux-${{ join(matrix.*, '-') }} | |
path: ovn/logs.tgz | |
- name: upload dist-docs on failure | |
if: failure() || cancelled() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-docs-${{ join(matrix.*, '-') }} | |
path: /tmp/dist-docs.tgz |