Skip to content

Commit 8b64061

Browse files
authored
Remove issue_comment trigger from update.yml (#910)
1 parent 3c92339 commit 8b64061

1 file changed

Lines changed: 5 additions & 68 deletions

File tree

.github/workflows/update.yml

Lines changed: 5 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Update Repository
22

3-
# Deny all permissions by default
4-
permissions: {}
5-
63
on:
74
# every Sunday at 00:36 UTC
85
# https://crontab.guru/#36_2_*_*_0
@@ -11,50 +8,17 @@ on:
118

129
workflow_dispatch:
1310

14-
issue_comment:
15-
types:
16-
- created
11+
# Deny all permissions by default
12+
permissions: {}
1713

1814
jobs:
1915
update:
20-
if: >-
21-
!github.event.repository.fork
22-
&& (
23-
github.event_name == 'schedule'
24-
|| github.event_name == 'workflow_dispatch'
25-
|| (
26-
github.event_name == 'issue_comment'
27-
&& github.event.issue.pull_request
28-
&& contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
29-
&& (
30-
github.event.comment.body == '@conda-bot render'
31-
|| github.event.comment.body == '@conda-bot recreate'
32-
)
33-
)
34-
)
35-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-slim
3617
permissions:
3718
contents: write # for committing changes
3819
pull-requests: write # for creating pull requests
3920
issues: write # for commenting on issues
4021
steps:
41-
- if: github.event_name == 'issue_comment'
42-
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
43-
with:
44-
comment-id: ${{ github.event.comment.id }}
45-
reactions: eyes
46-
reactions-edit-mode: replace
47-
token: ${{ secrets.SYNC_TOKEN }}
48-
49-
- if: github.event.comment.body == '@conda-bot render'
50-
name: Configure git origin
51-
env:
52-
REPOSITORY: ${{ github.event.issue.pull_request.head.repo.full_name }}
53-
REF: ${{ github.event.issue.pull_request.head.ref }}
54-
run: |
55-
echo "REPOSITORY=${REPOSITORY}" >> $GITHUB_ENV
56-
echo "REF=${REF}" >> $GITHUB_ENV
57-
5822
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5923
with:
6024
repository: ${{ env.REPOSITORY || github.repository }}
@@ -82,17 +46,13 @@ jobs:
8246
git add .
8347
git commit --message "🤖 updated file(s)"
8448
85-
- if: github.event.comment.body != '@conda-bot render'
86-
name: Create fork
49+
- name: Create fork
8750
# no-op if the repository is already forked
8851
run: echo FORK=$(gh repo fork --clone=false --default-branch-only 2>&1 | awk '{print $1}') >> $GITHUB_ENV
8952
env:
9053
GH_TOKEN: ${{ secrets.SYNC_TOKEN }}
9154

92-
- if: github.event.comment.body != '@conda-bot render'
93-
id: create
94-
# no-op if no commits were made
95-
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
55+
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
9656
with:
9757
push-to-fork: ${{ env.FORK }}
9858
token: ${{ secrets.SYNC_TOKEN }}
@@ -110,27 +70,4 @@ jobs:
11070
11171
This PR was triggered by @${{ github.triggering_actor }} via ${{ github.event_name }}.
11272
113-
<details>
114-
<summary>Commands</summary>
115-
116-
Trigger actions by commenting on this PR:
117-
118-
- `@conda-bot render` will run rendering workflows and commit and push any changes to this PR
119-
- `@conda-bot recreate` will recreate this PR, overwriting any edits that have been made to it
120-
121-
</details>
122-
12373
###### Auto-generated by the [`update.yml`][update.yml] workflow, see ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}.
124-
125-
- if: github.event.comment.body == '@conda-bot render'
126-
id: update
127-
name: Push changes
128-
run: git push --force-with-lease
129-
130-
- if: always() && github.event_name == 'issue_comment'
131-
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
132-
with:
133-
comment-id: ${{ github.event.comment.id }}
134-
reactions: ${{ (steps.create.conclusion == 'success' || steps.update.conclusion == 'success') && 'hooray' || 'confused' }}
135-
reactions-edit-mode: replace
136-
token: ${{ secrets.SYNC_TOKEN }}

0 commit comments

Comments
 (0)