octomation / go-module

🧩 Template for a typical module written on Go.

Home Page:https://go-module.octolab.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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.

https://github.com/actions/configure-pages/blob/f156874f8191504dae5b037505266ed5dda6c382/action.yml#L18-L19

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