-
Notifications
You must be signed in to change notification settings - Fork 28
46 lines (41 loc) · 1.25 KB
/
event-issue.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
# Privileged workflow to process issue events
name: Issue event
on:
issues:
types: [opened, closed]
permissions:
issues: write
env:
GH_LABEL: update
jobs:
issue-event:
name: Process
runs-on: ubuntu-latest
outputs:
bot-user: ${{ steps.bot-user.outputs.username }}
steps:
- name: Get bot username
id: bot-user
env:
GITHUB_TOKEN: ${{ secrets.OPENSLIDE_BOT_TOKEN }}
run: echo "username=$(gh api user -q .login)" >> $GITHUB_OUTPUT
- name: Label dependency issue
if: >-
github.event.action == 'opened' &&
github.actor == steps.bot-user.outputs.username &&
contains(github.event.issue.body, 'topic=dependencies')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue edit -R "${{ github.repository }}" \
"${{ github.event.issue.number }}" \
--add-label $GH_LABEL
update-from-issue:
name: Check for updates
needs: issue-event
if: >-
github.event.action == 'closed' &&
github.event.issue.user.login == needs.issue-event.outputs.bot-user &&
contains(github.event.issue.body, 'topic=dependencies')
uses: ./.github/workflows/update-check.yml
secrets: inherit