diff --git a/.github/workflows/event-issue.yml b/.github/workflows/event-issue.yml index bbbc3ad0..d8303ef6 100644 --- a/.github/workflows/event-issue.yml +++ b/.github/workflows/event-issue.yml @@ -4,7 +4,7 @@ name: Issue event on: issues: - types: [opened] + types: [opened, closed] permissions: issues: write @@ -16,6 +16,8 @@ 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 @@ -24,6 +26,7 @@ jobs: 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: @@ -32,3 +35,12 @@ jobs: 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 diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml index c8368b99..64c7cee9 100644 --- a/.github/workflows/update-check.yml +++ b/.github/workflows/update-check.yml @@ -8,6 +8,7 @@ on: paths: ['meson/subprojects/*.wrap'] schedule: - cron: '0 12 * * 1' + workflow_call: workflow_dispatch: permissions: @@ -80,6 +81,9 @@ jobs: $(cat stale-report) \`\`\` + I will automatically check wrapdb for updates when this issue is \ + closed. + " if [ -z "$issue" ]; then echo "Creating issue..."