-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (73 loc) · 2.44 KB
/
issues.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: 'issue closed'
on:
issues:
types: [closed]
# push:
# branches:
# - master
jobs:
update-contributors:
runs-on: [ubuntu-latest]
steps:
- name: Set up git repo
uses: actions/checkout@v2
- uses: actions/cache@v1
name: Cache ~/.cabal/packages
with:
path: ~/.cabal/packages
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
- uses: actions/cache@v1
name: Cache dist-newstyle
with:
path: dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-dist-newstyle
- uses: actions/cache@v1
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- uses: actions/cache@v1
name: Cache .stack-work
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ '**/*.hs' }}
# - name: Install cabal
# run: sudo apt-get install cabal-install
# - name: Update cabal
# run: cabal update
# - name: Install hpack
# run: cabal install hpack
- name: Extract issues
run: cd acknowledgments && stack run "${{ secrets.CONTRIBUTORS_MAPPING }}" > ../contributors.txt # hpack &&
- name: Copy acknowledgments
run: cp contributors.txt /home/runner/
- name: Checkout the book's repo
uses: actions/checkout@v2
with:
repository: 'lclem/problem_book'
#path: 'somewhereelse'
#fetch-depth: '0'
token: ${{ secrets.ACCESS_TOKEN }}
# - name: ls
# run: cd ~ && ls -la && find . -type d
- name: Copy acknowledgments
run: cp /home/runner/contributors.txt .
- name: Commit acknowledgments
run: git add contributors.txt
- name: Commit problem_book
uses: stefanzweifel/[email protected]
with:
#repository: 'somewhereelse'
commit_message: Update contributors
- name: Upload artifact contributors.txt
uses: actions/upload-artifact@v1
with:
name: contributors
path: contributors.txt