From 0080c75bc3542f0ee0f2ad831d501f454d6b7576 Mon Sep 17 00:00:00 2001 From: Tim Camise Date: Wed, 10 Apr 2024 11:34:08 -0700 Subject: [PATCH] Move copyright out of pre merge check --- .github/workflows/github-pages.yml | 31 +++++++++++++++++++--- .github/workflows/pre_merge_checks.yml | 36 ++------------------------ 2 files changed, 29 insertions(+), 38 deletions(-) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index ea98ca5f..67029607 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -9,7 +9,30 @@ on: workflow_dispatch: jobs: + copyright: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Check for (and add) missing copyrights + shell: bash + run: | + make copyright + echo "NUM_MODIFIED=$(git diff --numstat | wc -l)" >> $GITHUB_ENV + + - name: Push changes + if: env.NUM_MODIFIED != 0 + shell: bash + run: | + git config core.fileMode false + git config user.name github-actions + git config user.email github-actions@github.com + git add . + git commit -m "updating copyrights from pre merge check in github action" + git push -f origin HEAD:${GITHUB_HEAD_REF_NAME} + check: + needs: copyright name: Check modified files for Python SDK changes runs-on: ubuntu-latest outputs: @@ -29,16 +52,16 @@ jobs: git diff --name-only HEAD^ HEAD >files.txt while IFS= read -r file; do if [[ $file != demos/python/sdk_wireless_camera_control* ]]; then - echo "::set-output name=run_job::false" + echo "{run_job}={false}" >> $GITHUB_OUTPUT else echo "Found a Python SDK modified file" - echo "::set-output name=run_job::true" + echo "{run_job}={true}" >> $GITHUB_OUTPUT break fi done > $GITHUB_ENV - - - name: Push changes - if: env.NUM_MODIFIED != 0 - shell: bash - run: | - git config core.fileMode false - git config user.name github-actions - git config user.email github-actions@github.com - git add . - git commit -m "updating copyrights from pre merge check in github action" - git push -f origin HEAD:${{ steps.extract_branch.outputs.branch }} - test_github_pages: - needs: copyright timeout-minutes: 5 runs-on: ubuntu-latest steps: @@ -61,6 +27,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v3 + - name: Test Jekyll Build and Check Links run: make tests @@ -72,6 +39,7 @@ jobs: uses: actions/checkout@v3 with: ref: release + - name: Verify synchronized if release shell: bash run: |