Update pull_request_ci.yml
This commit is contained in:
parent
9e9618b780
commit
d092065d40
|
|
@ -9,75 +9,89 @@ concurrency:
|
|||
permissions:
|
||||
pull-requests: write
|
||||
jobs:
|
||||
checkout_check_whitespace:
|
||||
name: Checkout & Check Whitespace
|
||||
uses: VoronDesign/.github/.github/workflows/pr_checkout_check_whitespace_cache.yml@main
|
||||
check_whitespace:
|
||||
uses: VoronDesign/.github/.github/workflows/check-whitespace-cache.yml@main
|
||||
with:
|
||||
branch: ${{ github.ref }}
|
||||
cache-key: file-cache-${{github.sha}}
|
||||
cache-directory: pr-files
|
||||
parent-job-name: check_whitespace
|
||||
setup_python:
|
||||
needs: [checkout_check_whitespace]
|
||||
name: Prepare python environment
|
||||
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
||||
needs: [check_whitespace]
|
||||
if: ${{ needs.check_whitespace.outputs.stl == 'true' }}
|
||||
uses: VoronDesign/.github/.github/workflows/prepare-environment.yml@main
|
||||
with:
|
||||
apt-packages: "admesh, libadmesh-dev"
|
||||
pip-packages: "admesh imagekitio git+https://github.com/ChristophSchranz/Tweaker-3.git"
|
||||
python-cache-key: voronusers-python-cache
|
||||
check_stls:
|
||||
name: Check STL corruption
|
||||
check_stl_corruption:
|
||||
needs: [setup_python]
|
||||
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
||||
if: ${{ needs.check_whitespace.outputs.stl == 'true' }}
|
||||
uses: VoronDesign/.github/.github/workflows/check-stl-corruption.yml@main
|
||||
with:
|
||||
cache-key: file-cache-${{github.sha}}
|
||||
cache-directory: pr-files
|
||||
python-cache-key: voronusers-python-cache
|
||||
parent-job-name: check_stl_corruption
|
||||
check_stl_rotation:
|
||||
name: Check STL rotation
|
||||
needs: [setup_python]
|
||||
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
||||
if: ${{ needs.check_whitespace.outputs.stl == 'true' }}
|
||||
uses: VoronDesign/.github/.github/workflows/check-stl-rotation.yml@main
|
||||
secrets:
|
||||
# ToDo: Change to secrets: inherit once it's in the VoronDesign org
|
||||
IMAGEKIT_PRIVATE_KEY: ${{ secrets.IMAGEKIT_PRIVATE_KEY }}
|
||||
IMAGEKIT_PUBLIC_KEY: ${{ secrets.IMAGEKIT_PUBLIC_KEY }}
|
||||
with:
|
||||
imagekit-url-endpoint: https://ik.imagekit.io/vorondesign
|
||||
cache-key: file-cache-${{github.sha}}
|
||||
cache-directory: pr-files
|
||||
python-cache-key: voronusers-python-cache
|
||||
validate_metadata:
|
||||
name: Check metadata files
|
||||
needs: [checkout_check_whitespace]
|
||||
if: ${{ needs.checkout_check_whitespace.outputs.yaml == 'true' }}
|
||||
uses: VoronDesign/.github/.github/workflows/validate-metadata-files.yml@main
|
||||
parent-job-name: check_stl_rotation
|
||||
check_metadata:
|
||||
needs: [check_whitespace]
|
||||
if: ${{ needs.check_whitespace.outputs.yaml == 'true' }}
|
||||
uses: VoronDesign/.github/.github/workflows/check-metadata-files.yml@main
|
||||
with:
|
||||
cache-key: file-cache-${{github.sha}}
|
||||
cache-directory: pr-files
|
||||
parent-job-name: check_metadata
|
||||
preview_readme:
|
||||
name: Preview README.md
|
||||
needs: [validate_metadata]
|
||||
needs: [check_metadata]
|
||||
uses: VoronDesign/.github/.github/workflows/preview-readme.yml@main
|
||||
with:
|
||||
subdirectory: printer_mods
|
||||
cache-key: file-cache-${{github.sha}}
|
||||
cache-directory: pr-files
|
||||
parent-job-name: preview_readme
|
||||
prepare_pr_comment:
|
||||
name: Store PR comment parameters
|
||||
# The create_pr_common workflow listens for completion of this workload and executes.
|
||||
# This allows us to run in the context of our repo, with sufficient credentials to do PR comments/set labels. We pass the
|
||||
# information that the dispatched workflow can't deduce on its own via an uploaded artifact
|
||||
needs: [checkout_check_whitespace, check_stls, check_stl_rotation, validate_metadata, preview_readme]
|
||||
# Dispatching allows us to run in the context of our repo, with sufficient credentials to do PR comments/set labels. We pass the
|
||||
# information that the dispatched workflow can't deduce on its own via the client payload parameter
|
||||
needs: [check_whitespace, check_stl_corruption, check_stl_rotation, check_metadata, preview_readme]
|
||||
if: ${{ always() }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Save PR number
|
||||
run: |
|
||||
mkdir -p ${{ runner.temp }}/pr
|
||||
echo -n "Ready for review" > ${{ runner.temp }}/pr/ready_label
|
||||
echo -n ${{ github.event.number }} > ${{ runner.temp }}/pr/pr_number
|
||||
echo -n ${{ github.run_id }} > ${{ runner.temp }}/pr/action_run_id
|
||||
mkdir -p ${{ runner.temp }}/pr/check_stl_corruption
|
||||
echo -n ${{ needs.check_stl_corruption.outputs.extended-outcome }} > ${{ runner.temp }}/pr/check_stl_corruption/result
|
||||
echo -n ${{ needs.check_stl_corruption.outputs.numeric-job-id}} > ${{ runner.temp }}/pr/check_stl_corruption/job_id
|
||||
echo -n "CR: STL Corruption" > ${{ runner.temp }}/pr/check_stl_corruption/error_label
|
||||
mkdir -p ${{ runner.temp }}/pr/check_stl_rotation
|
||||
echo -n ${{ needs.check_stl_rotation.outputs.extended-outcome }} > ${{ runner.temp }}/pr/check_stl_rotation/result
|
||||
echo -n ${{ needs.check_stl_rotation.outputs.numeric-job-id}} > ${{ runner.temp }}/pr/check_stl_rotation/job_id
|
||||
echo -n "CR: STL Rotation" > ${{ runner.temp }}/pr/check_stl_rotation/error_label
|
||||
mkdir -p ${{ runner.temp }}/pr/check_whitespace
|
||||
echo -n ${{ needs.check_whitespace.outputs.extended-outcome }} > ${{ runner.temp }}/pr/check_whitespace/result
|
||||
echo -n ${{ needs.check_whitespace.outputs.numeric-job-id}} > ${{ runner.temp }}/pr/check_whitespace/job_id
|
||||
echo -n "CR: Files & Folders" > ${{ runner.temp }}/pr/check_whitespace/error_label
|
||||
mkdir -p ${{ runner.temp }}/pr/check_metadata
|
||||
echo -n ${{ needs.check_metadata.outputs.extended-outcome }} > ${{ runner.temp }}/pr/check_metadata/result
|
||||
echo -n ${{ needs.check_metadata.outputs.numeric-job-id}} > ${{ runner.temp }}/pr/check_metadata/job_id
|
||||
echo -n "CR: Metadata Files" > ${{ runner.temp }}/pr/check_metadata/error_label
|
||||
mkdir -p ${{ runner.temp }}/pr/preview_readme
|
||||
echo -n ${{ needs.preview_readme.outputs.extended-outcome }} > ${{ runner.temp }}/pr/preview_readme/result
|
||||
echo -n ${{ needs.preview_readme.outputs.numeric-job-id}} > ${{ runner.temp }}/pr/preview_readme/job_id
|
||||
echo -n "CR: Readme Preview" > ${{ runner.temp }}/pr/preview_readme/error_label
|
||||
- uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
|
||||
with:
|
||||
name: pr
|
||||
|
|
|
|||
Loading…
Reference in New Issue