File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 5555 path : hacklab-training
5656 fetch-depth : 0
5757
58+ - name : Check if this branch has its own docker image
59+ id : check_image
60+ run : |
61+ IMAGE_NAME=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
62+ if docker pull $IMAGE_NAME; then
63+ echo "Image exists"
64+ echo "exists=true" >> $GITHUB_OUTPUT
65+ else
66+ echo "Image does not exist"
67+ echo "exists=false" >> $GITHUB_OUTPUT
68+ exit 1
69+ fi
70+
5871 - name : Build
5972 run : |
60- docker run --rm -v $(pwd)/hacklab-training:/material -v $(pwd)/out:/out ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} /material /out
73+ docker run --rm -v $(pwd)/hacklab-training:/material -v $(pwd)/out:/out ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.check_image.exists == 'true' && github.ref_name || 'main' }} /material /out
6174 sudo find out -type f -not -iname '*.pdf' -not -iname '*.html' -delete
6275
6376 - name : Upload artifact
You can’t perform that action at this time.
0 commit comments