99 lines
5.0 KiB
YAML
99 lines
5.0 KiB
YAML
name: VoronUsers PR CI
|
|
run-name: "#${{github.event.number}} - ${{github.event.pull_request.title}}"
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
permissions:
|
|
pull-requests: write
|
|
jobs:
|
|
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: [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_stl_corruption:
|
|
needs: [setup_python]
|
|
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:
|
|
needs: [setup_python]
|
|
if: ${{ needs.check_whitespace.outputs.stl == 'true' }}
|
|
uses: VoronDesign/.github/.github/workflows/check-stl-rotation.yml@main
|
|
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
|
|
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:
|
|
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:
|
|
# 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
|
|
path: ${{ runner.temp }}/pr
|