Repository navigation
53 lines (48 loc) · 1.53 KB
/
Copy pathmirror-ci.yml
File metadata and controls
53 lines (48 loc) · 1.53 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Mirror ci directory
on:
push:
branches:
- master
paths:
- "ci/**"
workflow_dispatch: # Enables manual trigger
concurrency:
group: mirror-ci
cancel-in-progress: true
jobs:
mirror_ci:
if: contains(fromJSON('["cfengine","mendersoftware","NorthernTechHQ"]'), github.repository_owner)
name: Mirror ci directory to ${{ matrix.branch }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
matrix:
branch: [3.27.x, 3.24.x]
steps:
- name: Checks-out repository
uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: Replace ci directory with the one from master
run: |
git fetch --no-tags --depth=1 origin master
git rm -r --quiet --ignore-unmatch ci
git checkout FETCH_HEAD -- ci
- name: Create pull request
uses: peter-evans/create-pull-request@v8
with:
base: ${{ matrix.branch }}
branch: mirror-ci-${{ matrix.branch }}
delete-branch: true
signoff: true
commit-message: "Mirrored ci/ from master (${{ matrix.branch }})"
title: "Mirrored ci/ from master (${{ matrix.branch }})"
body: |
Automated mirror of the `ci/` directory from master using
[the `mirror-ci` workflow](https://github.com/cfengine/buildscripts/blob/master/.github/workflows/mirror-ci.yml).
reviewers: |
larsewi
craigcomstock