-
-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub CI: Deduplicate workflow configuration #2422
Comments
At the same time it would be useful to look into: does those - name: "Haskell env setup"
id: HaskEnvSetup
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
### ...
- name: "Configuring GitHub cache"
uses: actions/cache@v2
with:
path: |
${{ steps.HaskEnvSetup.outputs.cabal-store }} is enough (seems enough). |
Thanks for opening the issue, reusing workflows looks promising |
Bad news: seems like OS/GHC matrix seems to be needed to be restated for every reusable workflow. Good news: It would save in code complexity & maintenance anyway. I already today churned to keep in sync the |
The first thing to do with reusable workflows - is to start with having a workflow for |
I looked into what GitHub has & it is ... I basically wanted/imagined simple things:
Also, GitHub CI allows only 1 level of inheritance (does not allow to inherit workflow that inherited anything). Caching is designed by GitHub so - that its setup is not sharable, every workflow that uses caching - needs the action setup. So ... deduplication is limited. The best possible I see is still sync files into seamless form & then look at how to do #2422 (comment) I hope in the future GitHub would expand reuse abilities. |
What about custom actions? could we extract some reusable bits and make it actions (like our use of skip actions)? |
Custom actions are also partial solutions & not flawless. There are JS, |
I've looked into DHall & its alternatives. & DHall syntax is not pretty, & it is I am not holding my breath to be surprised or anything, but we would see. I for this purpose tried to unify a subset of |
There are also automations for |
After adding #2419, workflow configs, platform-specific things & matrix'es became shotgun-surgery enough to think about doing the https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#overview work to configure configuration in workflows in one place as much as possible.
The text was updated successfully, but these errors were encountered: