forked from xmonad/xmonad-contrib
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(wip) ci: Add haskell-ci-regenerate workflow
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Haskell-CI regenerate | ||
|
||
on: | ||
workflow_dispatch: | ||
# push: # FIXME: drop | ||
|
||
jobs: | ||
haskell-ci-regenerate: | ||
name: Haskell-CI regenerate | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone project | ||
uses: actions/checkout@v3 | ||
with: | ||
path: project | ||
|
||
- name: Clone haskell-ci | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: haskell-CI/haskell-ci | ||
path: haskell-ci | ||
|
||
- name: Get haskell-ci version | ||
id: haskell-ci-version | ||
working-directory: haskell-ci | ||
run: | | ||
{ echo -n version=; git rev-parse HEAD; } >> $GITHUB_OUTPUT | ||
- name: Setup Haskell | ||
id: setup | ||
uses: haskell/actions/setup@v2 | ||
with: | ||
ghc-version: 9.4 | ||
|
||
- name: Cache cabal store | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.setup.outputs.cabal-store }} | ||
key: cabal-store-${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}-haskell-ci-${{ steps.haskell-ci-version.outputs.version }} | ||
restore-keys: | | ||
cabal-store-${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}- | ||
- name: Install haskell-ci | ||
working-directory: haskell-ci | ||
run: | | ||
cabal install | ||
- name: Regenerate haskell-ci | ||
working-directory: project | ||
run: | | ||
haskell-ci regenerate | ||
- name: Commit/push if changed | ||
working-directory: project | ||
run: | | ||
set -ex | ||
git config user.name 'github-actions[bot]' | ||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
git diff --quiet --exit-code && exit | ||
git commit -a -m 'man: Update' | ||
git push |