Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Update #19

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/0_bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:

Since there are already a lot of open issues, please also take a moment to search existing ones to see if your bug has already been reported. If you find something related, please upvote that issue and provide additional details as necessary.

💐 Thank you for helping to make `conda-sandbox/test-synced` better. We would be unable to improve `conda-sandbox/test-synced` without our community!
💐 Thank you for helping to make `conda-sandbox/downstream` better. We would be unable to improve `conda-sandbox/downstream` without our community!
- type: checkboxes
id: checks
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1_feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:

Since there are already a lot of open issues, please also take a moment to search existing ones to see if your feature request has already been submitted. If you find something related, please upvote that issue and provide additional details as necessary.

💐 Thank you for helping to make `conda-sandbox/test-synced` better. We would be unable to improve `conda-sandbox/test-synced` without our community!
💐 Thank you for helping to make `conda-sandbox/downstream` better. We would be unable to improve `conda-sandbox/downstream` without our community!
- type: checkboxes
id: checks
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/epic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body:

Since there are already a lot of open issues, please also take a moment to search existing ones to see if a similar epic has already been opened. If you find something related, please upvote that issue and provide additional details as necessary.

💐 Thank you for helping to make `conda-sandbox/test-synced` better. We would be unable to improve `conda-sandbox/test-synced` without our community!
💐 Thank you for helping to make `conda-sandbox/downstream` better. We would be unable to improve `conda-sandbox/downstream` without our community!
- type: checkboxes
id: checks
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
let us know!

Helpful links:
- Conda Org COC: https://github.com/conda-sandbox/test-synced/blob/main/CODE_OF_CONDUCT.md
- Contributing docs: https://github.com/conda-sandbox/test-synced/blob/main/CONTRIBUTING.md -->
- Conda Org COC: https://github.com/conda-sandbox/downstream/blob/main/CODE_OF_CONDUCT.md
- Contributing docs: https://github.com/conda-sandbox/downstream/blob/main/CONTRIBUTING.md -->
95 changes: 90 additions & 5 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
name: Update

on:
# every every 15th minute
# https://crontab.guru/#*/15_*_*_*_*
# every Sunday at 00:00 UTC
# https://crontab.guru/#0_2_*_*_0
schedule:
- cron: '*/15 * * * *'
- cron: '0 2 * * 0'

workflow_dispatch:
inputs:
only-labels:
description: Only run label synchronization.
default: true
type: boolean

delete-unmapped-labels:
description: Delete labels not mapped in either global or local label configurations.
default: false
type: boolean

dry-run-labels:
description: Run label synchronization workflow without making any changes.
default: false
type: boolean


issue_comment:
types:
Expand All @@ -17,9 +33,14 @@ jobs:
if: >-
!github.event.repository.fork
&& (
github.event_name != 'issue_comment'
github.event_name == 'schedule'
|| (
github.event_name == 'workflow_dispatch'
&& !inputs.only-labels
)
|| (
github.event.issue.pull_request
github.event_name == 'issue_comment'
&& github.event.issue.pull_request
&& (
github.event.comment.body == '@conda-bot render'
|| github.event.comment.body == '@conda-bot recreate'
Expand Down Expand Up @@ -87,6 +108,7 @@ jobs:

- `@conda-bot render` will run rendering workflows and commit and push any changes to this PR
- `@conda-bot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@conda-bot labels` will synchronize labels

</details>

Expand All @@ -104,3 +126,66 @@ jobs:
reactions: ${{ (steps.create.conclusion == 'success' || steps.update.conclusion == 'success') && 'hooray' || 'confused' }}
reactions-edit-mode: replace
token: ${{ secrets.SYNC_TOKEN }}

labels:
if: >-
!github.event.repository.fork
&& (
github.event_name == 'schedule'
|| github.event_name == 'workflow_dispatch'
|| (
github.event_name == 'issue_comment'
&& github.event.issue.pull_request
&& github.event.comment.body == '@conda-bot labels'
)
)
runs-on: ubuntu-latest
env:
GLOBAL: https://raw.githubusercontent.com/conda/infrastructure/main/.github/global.yml
LOCAL: .github/labels.yml
permissions:
# https://github.com/EndBug/label-sync/issues/187#issuecomment-1442103739
issues: write
steps:
- if: github.event_name == 'issue_comment'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
comment-id: ${{ github.event.comment.id }}
reactions: eyes
reactions-edit-mode: replace
token: ${{ secrets.SYNC_TOKEN }}

- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- id: has_local
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
with:
files: ${{ env.LOCAL }}

- name: Global Only
if: steps.has_local.outputs.files_exists == 'false'
id: global
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
with:
config-file: ${{ env.GLOBAL }}
delete-other-labels: ${{ inputs.delete-unmapped-labels || 'false' }}
dry-run: ${{ inputs.dry-run-labels || 'false' }}

- name: Global & Local
if: steps.has_local.outputs.files_exists == 'true'
id: local
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
with:
config-file: |
${{ env.GLOBAL }}
${{ env.LOCAL }}
delete-other-labels: ${{ inputs.delete-unmapped-labels || 'false' }}
dry-run: ${{ inputs.dry-run-labels || 'false' }}

- if: always() && github.event_name == 'issue_comment'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
comment-id: ${{ github.event.comment.id }}
reactions: ${{ (steps.global.conclusion == 'success' || steps.local.conclusion == 'success') && 'hooray' || 'confused' }}
reactions-edit-mode: replace
token: ${{ secrets.SYNC_TOKEN }}
Loading