podman

Форк
0
/
issue_pr_lock.yml 
72 строки · 2.4 Кб
1
---
2

3
# WARNING ALERT DANGER CAUTION ATTENTION: This file is re-used from the
4
# `main` branch, by workflows in (at least) the Buildah and Skopeo repos.
5
# Please think twice before making large changes, renaming, or moving the file.
6

7
# Format ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
8

9
name: "Lock closed issues and PRs"
10

11
on:
12
  schedule:
13
    - cron: '0 0 * * *'
14
  # Allow re-use of this workflow by other repositories
15
  # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows
16
  workflow_call:
17
    secrets:
18
      ACTION_MAIL_SERVER:
19
        required: true
20
      ACTION_MAIL_USERNAME:
21
        required: true
22
      ACTION_MAIL_PASSWORD:
23
        required: true
24
      ACTION_MAIL_SENDER:
25
        required: true
26
  # Debug: Allow triggering job manually in github-actions WebUI
27
  workflow_dispatch: {}
28

29
permissions:
30
  contents: read
31

32
concurrency:
33
  group: lock
34

35
env:
36
  # Number of days before a closed issue/PR is be comment-locked.
37
  # Note: dessant/lock-threads will only process a max. of
38
  # 50 issues/PRs at a time.
39
  CLOSED_DAYS: 90
40
  # Pre-created issue/PR label to add (preferably a bright color).
41
  # This is intended to direct a would-be commenter's actions.
42
  LOCKED_LABEL: 'locked - please file new issue/PR'
43

44
jobs:
45
  manage_locking:
46
    runs-on: ubuntu-latest
47
    permissions:
48
      issues: write
49
      pull-requests: write
50
    steps:
51
      # Ref: https://github.com/dessant/lock-threads#usage
52
      - uses: dessant/lock-threads@v5
53
        with:
54
          process-only: 'issues, prs'
55
          issue-inactive-days: '${{env.CLOSED_DAYS}}'
56
          pr-inactive-days: '${{env.CLOSED_DAYS}}'
57
          add-issue-labels: '${{env.LOCKED_LABEL}}'
58
          add-pr-labels: '${{env.LOCKED_LABEL}}'
59
          pr-lock-reason: 'resolved'
60
          log-output: true
61
      - if: failure()
62
        name: Send job failure notification e-mail
63
        uses: dawidd6/action-send-mail@v3.12.0
64
        with:
65
          server_address: ${{secrets.ACTION_MAIL_SERVER}}
66
          server_port: 465
67
          username: ${{secrets.ACTION_MAIL_USERNAME}}
68
          password: ${{secrets.ACTION_MAIL_PASSWORD}}
69
          subject: Github workflow error on ${{github.repository}}
70
          to: podman-monitor@lists.podman.io
71
          from: ${{secrets.ACTION_MAIL_SENDER}}
72
          body: "Job failed: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
73

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.