Skip to content
Open

test #37

Changes from all commits
Commits
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
40 changes: 1 addition & 39 deletions .github/workflows/api_changes_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ permissions: read-all

on:
pull_request:
branches:
- develop

env:
API_DOC_HTML_ROOT_RELATIVE_PATH: autoapi
Expand All @@ -14,54 +12,18 @@ concurrency:
cancel-in-progress: true

jobs:
call-build-api-doc:
uses: ./.github/workflows/build_html_doc.yml
with:
ref: "refs/pull/${{ github.event.number }}/merge"

compare-api-doc-with-develop:
timeout-minutes: 30
needs: call-build-api-doc
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Download built HTML doc as artifact from previous step
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: html_doc_artifact
- run: |
tar -xvf artifact.tar
rm artifact.tar
shell: 'bash'
- name: Checkout latest doc_pages branch tip
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: doc_pages
path: previous_doc_state
- name: Get changed file names in API doc path
id: diff
run: |
cd html_build/html/$API_DOC_HTML_ROOT_RELATIVE_PATH
CHANGED_FILES=$(find . -name "*.html" -exec diff -qrBZ {} $GITHUB_WORKSPACE/previous_doc_state/$API_DOC_HTML_ROOT_RELATIVE_PATH/{} \;)
echo ${CHANGED_FILES}
CHANGED_FILES=$(echo $CHANGED_FILES | tr '\n' ' ')
echo "changed_files=${CHANGED_FILES}" >> $GITHUB_OUTPUT

- name: Add label
if: ${{ contains(steps.diff.outputs.changed_files, 'differ') }}
run: |
echo '{"pr_number": "${{ github.event.pull_request.number }}", "action": "add"}' > api_status.json

- name: Remove label
if: ${{ !(contains(steps.diff.outputs.changed_files, 'differ')) && contains(github.event.pull_request.labels.*.name, 'API') }}
run: |
echo '{"pr_number": "${{ github.event.pull_request.number }}", "action": "remove"}' > api_status.json

- name: No change label
if: ${{ !(contains(steps.diff.outputs.changed_files, 'differ')) && !contains(github.event.pull_request.labels.*.name, 'API') }}
run: |
echo '{"pr_number": "${{ github.event.pull_request.number }}", "action": "none"}' > api_status.json

- name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
with:
Expand Down
Loading