-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (31 loc) · 1.18 KB
/
abe.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
on:
push:
branches:
- main
paths:
- 'abe/payments/**'
- 'abe/payouts/**'
- '.github/workflows/abe.yml'
jobs:
accounting_job:
runs-on: ubuntu-latest
name: Do ABE accounting
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Fix git safe.directory in container
run: mkdir -p /home/runner/work/_temp/_github_home && printf "[safe]\n\tdirectory = /github/workspace" > /home/runner/work/_temp/_github_home/.gitconfig
- uses: actions/checkout@v3
- name: Do accounting
id: doAccounting
uses: countvajhula/old-abe@scratch
- name: Find balances issue
id: findIssue
run: echo "issueId=`gh issue list -l outstanding-balances -s open --json number --jq .[].number`" >> "$GITHUB_OUTPUT"
- name: Close existing issue reporting outstanding balances if present
if: steps.findIssue.outputs.issueId
run: |
gh issue close "${{steps.findIssue.outputs.issueId}}"
- name: Create an issue with the computed outstanding balances
run: |
gh issue create -b "${{ steps.doAccounting.outputs.balances }}" -t "Outstanding Balances" -l outstanding-balances