ci/cd: disable some actions by default
kamilsk opened this issue · comments
Motivation: a created from the template repository has broken builds, e.g.,
![image](https://private-user-images.githubusercontent.com/1165416/245583929-d694d13f-ac17-4161-b5b5-e6b45ce2d72f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxNDMwODUsIm5iZiI6MTcxOTE0Mjc4NSwicGF0aCI6Ii8xMTY1NDE2LzI0NTU4MzkyOS1kNjk0ZDEzZi1hYzE3LTQxNjEtYjViNS1lNmI0NWNlMmQ3MmYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjNUMTEzOTQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzVhMzYxN2FkNDEzYmJmMTM2YmRmZGVkOTFhNTcyOTMxNjQyYTFlZDM0NjlkY2ZjNDUzMzllYzI5ZTNiZDhiZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.yFre4eEDaoP09-wD9rDF1OevLSoX-x4COxfHbIB4XWs)
Proof of concept
ENABLED_ACTIONS=(
caches
cd
ci
deps
docs <- failed from scratch
runs
stale
tools
)
# or
ENABLED_ACTIONS=[caches,...,tools]
Use contains
https://docs.github.com/en/actions/learn-github-actions/expressions#contains.
The alternative is to provide more convenient messages to handle failed builds.
Run actions/configure-pages@v3
with:
token: ***
enablement: false
Error: Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action.
Error: HttpError: Not Found