forked from grafana/alloy
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.01 KB
/
release-backport-trigger.yml
File metadata and controls
36 lines (32 loc) · 1.01 KB
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
name: Backport PR - Trigger
on:
pull_request:
types: [labeled, closed]
permissions:
contents: read
pull-requests: read
jobs:
trigger:
# Only run when:
# - In the upstream repo (not forks)
# - PR is merged
# - Has at least one backport label
# If all jobs are skipped, the workflow is not considered "successful".
if: >
github.repository == 'grafana/alloy' &&
github.event.pull_request.merged == true &&
contains(toJSON(github.event.pull_request.labels.*.name), 'backport/')
runs-on: ubuntu-latest
steps:
- name: Save PR number for worker workflow 📦
run: |
mkdir -p backport-info
echo "${PR_NUMBER}" > backport-info/pr_number
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
- name: Upload PR info artifact 🛫
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: backport-info
path: backport-info/
retention-days: 1