-
Notifications
You must be signed in to change notification settings - Fork 81
40 lines (40 loc) · 1.18 KB
/
update-ghc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Update GHC
on:
schedule:
# run weekly on Thursday
- cron: '0 15 * * THU'
workflow_dispatch: # allows manual triggering
jobs:
update_ghc:
name: GHC ${{ matrix.ghc }} Update
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc:
- '9.2'
- '9.4'
- '9.6'
- '9.8'
- '9.10'
steps:
- uses: actions/checkout@v4
with:
ref: master
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=nixpkgs/default.nix
- name: Fetch updates
id: ghc_update
run: |-
nix-shell -p 'bazel-buildtools' 'python3.withPackages (ps: [ps.packaging])' --run \
'python .github/update-ghc.py ${{ matrix.ghc }}'
- name: Create Pull Request
if: steps.ghc_update.outputs.latest != ''
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Add GHC bindist version ${{ steps.ghc_update.outputs.latest }}"
title: "[update] GHC ${{ matrix.ghc }}"
branch: "automation/update-ghc-${{ matrix.ghc }}"
base: master
token: "${{ secrets.PR_TRIGGER_TOKEN }}"