-
Notifications
You must be signed in to change notification settings - Fork 169
40 lines (31 loc) · 1.07 KB
/
pull-request.yaml
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
name: CI-pullrequest
on:
pull_request:
branches:
- main-source
jobs:
build:
runs-on: ubuntu-latest
env:
CI_TOOLS_URL: https://github.com/rancher/partner-charts-ci/releases/latest/download/partner-charts-ci-linux-amd64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch CI Tools
run: |
curl -s -L -o /usr/local/bin/partner-charts-ci $CI_TOOLS_URL
chmod +x /usr/local/bin/partner-charts-ci
- name: Checkout into branch
run: git checkout -b staging-pr-workflow
- name: Fetch main-source
run: git fetch origin main-source
- name: Set git user for rebase
run: |
git config user.name "$(git log -n 1 --pretty=format:%an)"
git config user.email "$(git log -n 1 --pretty=format:%ae)"
- name: Rebase to main-source
run: git rebase origin/main-source
- name: Validate
if: "!contains(github.event.pull_request.title, '[modified charts]')"
run: partner-charts-ci validate