-
Notifications
You must be signed in to change notification settings - Fork 13
71 lines (64 loc) · 2.85 KB
/
ack.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# ack workflow runs on any change made to a pull-request and aims to verify
# that is following our practices. Initial version is checking correct label
# presence.
name: ack
on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]
workflow_call: # allows reuse of this workflow from other devtools repos
jobs:
ack:
runs-on: ubuntu-latest
environment: ack
permissions:
checks: write
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
# Use of release drafter action for adding semantic labels based on
# either title, body or source branch name. We ignore potential failure
# of this step.
- uses: release-drafter/release-drafter@v5
with:
# we only want to use the auto-labeler bits:
disable-autolabeler: false
disable-releaser: true
# config from .github/release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
# Ensure that one of the required labels is present and none of the undesired is absent
# See https://github.com/jesusvasquez333/verify-pr-label-action
- name: Verify PR label action
uses: jesusvasquez333/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: "bug, enhancement, feature, refactoring, major, deprecated, skip-changelog, bot:chronographer:skip"
invalid-labels: "help wanted, invalid, feedback-needed, incomplete"
pull-request-number: "${{ github.event.pull_request.number }}"
disable-reviews: true
- name: Update release notes if this is already merged
if: github.event.pull_request.merged == true
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add PR to 'devtools' project
uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/ansible/projects/86
# Do not use secrets.GITHUB_TOKEN here because it does not have
# access to projects. Only personal access tokens (PAT) can be used.
github-token: ${{ secrets.BOT_PAT }}
# labeled: skip-changelog
# label-operator: NOT
# - name: Auto-approve pull-requests made by approved bots
# # https://github.com/marketplace/actions/auto-approve
# if: contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.actor)
# uses: hmarr/auto-approve-action@v3
# - name: Enable auto-merge on changes made by approved bots
# if: contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.actor)
# uses: alexwilson/enable-github-automerge-action@main
# with:
# github-token: "${{ secrets.GITHUB_TOKEN }}"