11name : Generate outputs
22on :
33 workflow_call :
4+ inputs :
5+ with_pr_container :
6+ required : true
7+ type : boolean
48
59jobs :
610 re-generate :
1014 contents : write
1115
1216 steps :
13- - name : Remove pre-installed apps to make space for build
14- run : |
15- sudo apt-get remove -y '^llvm-.*'
16- sudo apt-get remove -y '^dotnet-.*'
17- sudo apt-get remove -y 'php.*'
18- sudo apt-get remove -y '^mongodb-.*'
19- sudo apt-get remove -y '^mysql-.*'
20- sudo apt-get autoremove -y
21- sudo apt-get clean
22- sudo rm -rf /usr/share/dotnet/
23- sudo rm -rf /usr/local/share/powershell
24- sudo rm -rf /usr/local/share/chromium
25- sudo rm -rf /usr/local/lib/android
26- sudo rm -rf /usr/local/lib/node_modules
27- sudo docker system prune -af
28-
2917 - name : Checkout (Push)
3018 if : github.event_name != 'pull_request'
3119 uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
@@ -40,14 +28,14 @@ jobs:
4028 repository : ${{ github.event.pull_request.head.repo.full_name }}
4129
4230 - name : Download container from artifact if PR
43- if : github.event_name == 'pull_request' && needs.container.result == 'success'
31+ if : github.event_name == 'pull_request' && inputs.with_pr_container
4432 uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
4533 with :
4634 name : tutorial-container
4735 path : /tmp
4836
4937 - name : Import container from PR artifact
50- if : github.event_name == 'pull_request' && needs.container.result == 'success'
38+ if : github.event_name == 'pull_request' && inputs.with_pr_container
5139 run : |
5240 docker load --input /tmp/tutorial-container.tar
5341 docker image ls -a
0 commit comments