Skip to content

Commit

Permalink
(wip) ci: Add haskell-ci-regenerate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin committed Oct 24, 2023
1 parent 9c4325f commit 1beb220
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/haskell-ci-regenerate.yml
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

0 comments on commit 1beb220

Please sign in to comment.