Add updates for reusable workflows v3
This commit is contained in:
parent
d6d64ade76
commit
70370e345a
|
|
@ -0,0 +1,13 @@
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["VoronUsers PR CI"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create_pr_comment:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
name: Create PR comment and assign labels
|
||||||
|
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
||||||
|
uses: VoronDesign/.github/.github/workflows/pr-comment-labels.yml@v3
|
||||||
|
|
@ -11,7 +11,7 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
checkout_check_whitespace:
|
checkout_check_whitespace:
|
||||||
name: Checkout & Check Whitespace
|
name: Checkout & Check Whitespace
|
||||||
uses: VoronDesign/.github/.github/workflows/pr_checkout_check_whitespace_cache.yml@v2
|
uses: VoronDesign/.github/.github/workflows/pr_checkout_check_whitespace_cache.yml@v3
|
||||||
with:
|
with:
|
||||||
branch: ${{ github.ref }}
|
branch: ${{ github.ref }}
|
||||||
cache-key: file-cache-${{github.sha}}
|
cache-key: file-cache-${{github.sha}}
|
||||||
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
needs: [checkout_check_whitespace]
|
needs: [checkout_check_whitespace]
|
||||||
name: Prepare python environment
|
name: Prepare python environment
|
||||||
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
||||||
uses: VoronDesign/.github/.github/workflows/prepare-environment.yml@v2
|
uses: VoronDesign/.github/.github/workflows/prepare-environment.yml@v3
|
||||||
with:
|
with:
|
||||||
apt-packages: "admesh, libadmesh-dev"
|
apt-packages: "admesh, libadmesh-dev"
|
||||||
pip-packages: "admesh imagekitio git+https://github.com/ChristophSchranz/Tweaker-3.git"
|
pip-packages: "admesh imagekitio git+https://github.com/ChristophSchranz/Tweaker-3.git"
|
||||||
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
name: Check STL corruption
|
name: Check STL corruption
|
||||||
needs: [setup_python]
|
needs: [setup_python]
|
||||||
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
||||||
uses: VoronDesign/.github/.github/workflows/check-stl-corruption.yml@v2
|
uses: VoronDesign/.github/.github/workflows/check-stl-corruption.yml@v3
|
||||||
with:
|
with:
|
||||||
cache-key: file-cache-${{github.sha}}
|
cache-key: file-cache-${{github.sha}}
|
||||||
cache-directory: pr-files
|
cache-directory: pr-files
|
||||||
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
name: Check STL rotation
|
name: Check STL rotation
|
||||||
needs: [setup_python]
|
needs: [setup_python]
|
||||||
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
if: ${{ needs.checkout_check_whitespace.outputs.stl == 'true' }}
|
||||||
uses: VoronDesign/.github/.github/workflows/check-stl-rotation.yml@v2
|
uses: VoronDesign/.github/.github/workflows/check-stl-rotation.yml@v3
|
||||||
secrets:
|
secrets:
|
||||||
# ToDo: Change to secrets: inherit once it's in the VoronDesign org
|
# ToDo: Change to secrets: inherit once it's in the VoronDesign org
|
||||||
IMAGEKIT_PRIVATE_KEY: ${{ secrets.IMAGEKIT_PRIVATE_KEY }}
|
IMAGEKIT_PRIVATE_KEY: ${{ secrets.IMAGEKIT_PRIVATE_KEY }}
|
||||||
|
|
@ -52,34 +52,33 @@ jobs:
|
||||||
name: Check metadata files
|
name: Check metadata files
|
||||||
needs: [checkout_check_whitespace]
|
needs: [checkout_check_whitespace]
|
||||||
if: ${{ needs.checkout_check_whitespace.outputs.yaml == 'true' }}
|
if: ${{ needs.checkout_check_whitespace.outputs.yaml == 'true' }}
|
||||||
uses: VoronDesign/.github/.github/workflows/validate-metadata-files.yml@v2
|
uses: VoronDesign/.github/.github/workflows/validate-metadata-files.yml@v3
|
||||||
with:
|
with:
|
||||||
cache-key: file-cache-${{github.sha}}
|
cache-key: file-cache-${{github.sha}}
|
||||||
cache-directory: pr-files
|
cache-directory: pr-files
|
||||||
preview_readme:
|
preview_readme:
|
||||||
name: Preview README.md
|
name: Preview README.md
|
||||||
needs: [validate_metadata]
|
needs: [validate_metadata]
|
||||||
uses: VoronDesign/.github/.github/workflows/preview-readme.yml@v2
|
uses: VoronDesign/.github/.github/workflows/preview-readme.yml@v3
|
||||||
with:
|
with:
|
||||||
subdirectory: printer_mods
|
subdirectory: printer_mods
|
||||||
cache-key: file-cache-${{github.sha}}
|
cache-key: file-cache-${{github.sha}}
|
||||||
cache-directory: pr-files
|
cache-directory: pr-files
|
||||||
create_pro_comment:
|
prepare_pr_comment:
|
||||||
name: Create 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]
|
needs: [checkout_check_whitespace, check_stls, check_stl_rotation, validate_metadata, preview_readme]
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: VoronDesign/.github/.github/workflows/generate-pr-comment.yml@v2
|
runs-on: ubuntu-latest
|
||||||
with:
|
steps:
|
||||||
repository: ${{ github.repository }}
|
- name: Save PR number
|
||||||
action_run_id: ${{ github.run_id }}
|
run: |
|
||||||
|
mkdir -p ${{ runner.temp }}/pr
|
||||||
|
echo -n ${{ github.event.number }} > ${{ runner.temp }}/pr/pr_number
|
||||||
# check_files:
|
echo -n ${{ github.run_id }} > ${{ runner.temp }}/pr/action_run_id
|
||||||
# name: Check files
|
- uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
|
||||||
# needs: [validate_metadata]
|
with:
|
||||||
# uses: VoronDesign/.github/.github/workflows/validate_files.yml@v1
|
name: pr
|
||||||
# with:
|
path: ${{ runner.temp }}/pr
|
||||||
# subdirectory: printer_mods
|
|
||||||
# cache-key: file-cache-${{github.sha}}
|
|
||||||
# cache-directory: pr-files
|
|
||||||
# python-cache-key: voronusers-python-cache
|
|
||||||
|
|
@ -6,19 +6,18 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
setup_python:
|
setup_python:
|
||||||
name: Rebuild repo caches
|
name: Rebuild repo caches
|
||||||
uses: VoronDesign/.github/.github/workflows/prepare-environment.yml@v2
|
uses: VoronDesign/.github/.github/workflows/prepare-environment.yml@v3
|
||||||
with:
|
with:
|
||||||
apt-packages: "admesh, libadmesh-dev"
|
apt-packages: "admesh, libadmesh-dev"
|
||||||
pip-packages: "admesh imagekitio git+https://github.com/ChristophSchranz/Tweaker-3.git"
|
pip-packages: "admesh imagekitio git+https://github.com/ChristophSchranz/Tweaker-3.git"
|
||||||
python-cache-key: voronusers-python-cache
|
python-cache-key: voronusers-python-cache
|
||||||
preview_readme:
|
preview_readme:
|
||||||
name: Generate README
|
name: Generate README
|
||||||
uses: VoronDesign/.github/.github/workflows/generate-readme.yml@v2
|
uses: VoronDesign/.github/.github/workflows/generate-readme.yml@v3
|
||||||
with:
|
with:
|
||||||
subdirectory: printer_mods
|
subdirectory: printer_mods
|
||||||
commit_msg: "Generate VoronUsers printer_mods README.md [skip ci]"
|
commit_msg: "Generate VoronUsers printer_mods README.md [skip ci]"
|
||||||
commit_user: Voron-GitHub-Bot
|
commit_user: Voron-GitHub-Bot
|
||||||
commit_email: github@vorondesign.com
|
commit_email: github@vorondesign.com
|
||||||
secrets:
|
secrets:
|
||||||
VORON_BOT_GITHUB_PAT: ${{ secrets.VORON_BOT_GITHUB_PAT }}
|
VORON_BOT_GITHUB_PAT: ${{ secrets.VORON_BOT_GITHUB_PAT }}
|
||||||
|
|
||||||
Loading…
Reference in New Issue