Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add job: Rebase Pull Requests #3642

Merged
merged 39 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5ed3e0d
Add job: Rebase Pull Requests
akucharska Jan 29, 2025
daeaeed
use better package
akucharska Jan 29, 2025
7c6fa13
test branches
akucharska Jan 29, 2025
6e6285b
Docs
akucharska Jan 29, 2025
17df043
test
akucharska Jan 29, 2025
25344b2
Update README.md
akucharska Jan 29, 2025
1746126
try this
akucharska Jan 29, 2025
c6df514
test
akucharska Jan 29, 2025
594727f
test
akucharska Jan 29, 2025
79b6815
Merge branch 'main' into gh-actions-rebase
akucharska Jan 29, 2025
a87c29b
Merge branch 'main' into gh-actions-rebase
akucharska Jan 30, 2025
ba91f94
Try rebase in other jobs
akucharska Jan 30, 2025
747ffc3
Try legacy rebase
akucharska Jan 30, 2025
e8a7b17
Revert
akucharska Jan 30, 2025
aee70bd
Try fixing rebase
akucharska Jan 30, 2025
f7cd654
fetch from current branch
akucharska Jan 30, 2025
d5300da
not working
akucharska Jan 30, 2025
c093051
here we go again
akucharska Jan 30, 2025
35e19fa
will not work
akucharska Jan 30, 2025
ce6fc6c
lololo
akucharska Jan 30, 2025
f79f1a4
Would be nice if it works
akucharska Jan 30, 2025
9856950
Merge branch 'main' into gh-actions-rebase
akucharska Jan 30, 2025
3718383
another try
akucharska Jan 30, 2025
1fa22f5
debug
akucharska Jan 30, 2025
334cb23
lolo
akucharska Jan 30, 2025
5e84d92
sth
akucharska Jan 30, 2025
71512ef
sth
akucharska Jan 30, 2025
3269347
sth
akucharska Jan 30, 2025
6e158af
Change rebase to merge
akucharska Jan 30, 2025
0464209
Is it neccessary
akucharska Jan 31, 2025
ed2cf2c
Is it neccessary
akucharska Jan 31, 2025
a25f20c
It is neccessary
akucharska Jan 31, 2025
71b04e3
Change all neccessary workflows
akucharska Jan 31, 2025
b2765e6
Change readme back
akucharska Jan 31, 2025
43d80ca
Add name to step
akucharska Feb 5, 2025
e9112b6
Change naming convention: rebase to merge
akucharska Feb 5, 2025
0867024
Move file
akucharska Feb 5, 2025
921ad41
Try removing depth
akucharska Feb 5, 2025
e73fae7
Adjust naming
akucharska Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: 'Rebase'
description: 'Action for rebasing to the main branch'
name: 'Merge'
description: 'Action for merging PR with the latest main branch'

runs:
using: 'composite'
steps:
# Setup identity to avoid errors when git is trying to rebase without identity set
- name: Setup git identity
run: |
git config --global user.email "rebase@action.com"
git config --global user.name "Rebase Action"
git config --global user.email "merge@action.com"
git config --global user.name "Merge Action"
shell: bash

# Update origin/main branch locally to cover case when repo is not fully cloned
Expand All @@ -19,15 +19,15 @@ runs:
git fetch origin main
git checkout origin/main
git checkout -B main
git pull --unshallow origin main
git pull origin main

# go back to the HEAD commit
git switch --detach ${{ github.sha }}
shell: bash

- name: Rebase to main
- name: Merge with latest main
run: |
git rebase main
git merge main
shell: bash

- name: Print branch log
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/accessibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Accessibility Tests

on:
schedule:
- cron: "0 6 * * 1"
- cron: '0 6 * * 1'
pull_request_target:
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/accessibility-tests.yml"
- "tests/integration/tests/accessibility/**"
- "tests/integration/support/**"
- '.github/workflows/accessibility-tests.yml'
- 'tests/integration/tests/accessibility/**'
- 'tests/integration/support/**'

jobs:
run-accessibility-tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

create-release:
name: Create release
needs: [ build-busola-web, build-busola-backend, build-busola ]
needs: [build-busola-web, build-busola-backend, build-busola]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint-check-pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PR Lint Check

on:
on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]

Expand All @@ -15,7 +15,7 @@ jobs:
- name: lint_check
shell: bash
run: |
set -e
npm ci
npx eslint --max-warnings 0 src/ backend/
npm run lint-check
set -e
npm ci
npx eslint --max-warnings 0 src/ backend/
npm run lint-check
6 changes: 3 additions & 3 deletions .github/workflows/lint-markdown-links-daily.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Lint Markdown Links Daily
run-name: ${{github.event.pull_request.title}}
on:
schedule:
schedule:
# Run everyday at 5:00 AM
- cron: "0 5 * * *"
- cron: '0 5 * * *'
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec
with:
use-quiet-mode: 'yes'
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.mlc.config.json'
folder-path: '.'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-markdown-links-pr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Lint Markdown Links PR
run-name: ${{github.event.pull_request.title}}
on: [ pull_request ]
on: [pull_request]
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec
with:
use-quiet-mode: 'yes'
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.mlc.config.json'
folder-path: '.'
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/pull-integration-cluster-k3d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: PR Integration Cluster Tests

on:
pull_request:
types: [ opened, edited, synchronize, reopened, ready_for_review ]
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/pull-integration-cluster-k3d.yml"
- "resources/**"
- "tests/**"
- "nginx/**"
- "src/**"
- "backend/**"
- '.github/workflows/pull-integration-cluster-k3d.yml'
- 'resources/**'
- 'tests/**'
- 'nginx/**'
- 'src/**'
- 'backend/**'

jobs:
run-cluster-test:
Expand All @@ -20,11 +20,14 @@ jobs:
with:
comment_on_pr: false
- uses: actions/checkout@v4
# - uses: ./.github/actions/rebase
with:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add name

fetch-depth: 0
- name: Merge with latest main
uses: ./.github/actions/merge
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
with:
cluster-name: "k3dCluster"
cluster-name: 'k3dCluster'
args: >-
--agents 1
--port 80:80@loadbalancer
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/pull-integration-namespace-k3d.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: PR Integration Namespace Tests

on:
on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/pull-integration-namespace-k3d.yml"
- "resources/**"
- "tests/**"
- "nginx/**"
- "src/**"
- "backend/**"
- '.github/workflows/pull-integration-namespace-k3d.yml'
- 'resources/**'
- 'tests/**'
- 'nginx/**'
- 'src/**'
- 'backend/**'

jobs:
run-namespace-test:
Expand All @@ -20,11 +20,14 @@ jobs:
with:
comment_on_pr: false
- uses: actions/checkout@v4
# - uses: ./.github/actions/rebase
with:
fetch-depth: 0
- name: Merge with latest main
uses: ./.github/actions/merge
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
with:
cluster-name: "k3dCluster"
cluster-name: 'k3dCluster'
args: >-
--agents 1
--port 80:80@loadbalancer
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/pull-kyma-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/pull-kyma-intergation-tests.yml"
- "resources/**"
- "tests/integration/**"
- "nginx/**"
- "src/**"
- "backend/**"
- "kyma/**"
- "Dockerfile*"
- '.github/workflows/pull-kyma-intergation-tests.yml'
- 'resources/**'
- 'tests/integration/**'
- 'nginx/**'
- 'src/**'
- 'backend/**'
- 'kyma/**'
- 'Dockerfile*'
jobs:
run-integration-test:
runs-on: ubuntu-latest
Expand All @@ -21,7 +21,10 @@ jobs:
with:
comment_on_pr: false
- uses: actions/checkout@v4
# - uses: ./.github/actions/rebase
with:
fetch-depth: 0
- name: Merge with latest main
uses: ./.github/actions/merge
- name: Install k3d
env:
K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/pull-lighthouse.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: PR Lighthouse Test

on:
on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/pull-lighthouse.yml"
- "resources/**"
- "tests/**"
- "nginx/**"
- "src/**"
- '.github/workflows/pull-lighthouse.yml'
- 'resources/**'
- 'tests/**'
- 'nginx/**'
- 'src/**'

jobs:
run-lighthouse-test:
Expand All @@ -19,11 +19,14 @@ jobs:
with:
comment_on_pr: false
- uses: actions/checkout@v4
# - uses: ./.github/actions/rebase
with:
fetch-depth: 0
- name: Merge with latest main
uses: ./.github/actions/merge
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
with:
cluster-name: "k3dCluster"
cluster-name: 'k3dCluster'
args: >-
--agents 1
--port 80:80@loadbalancer
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/pull-smoke-test-prod.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: PR Kyma Dashboard Smoke Tests Prod

on:
on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/pull-smoke-test-prod.yml"
- "resources/**"
- "tests/kyma/**"
- "nginx/**"
- "src/**"
- "kyma/**"
- "Dockerfile*"
- '.github/workflows/pull-smoke-test-prod.yml'
- 'resources/**'
- 'tests/kyma/**'
- 'nginx/**'
- 'src/**'
- 'kyma/**'
- 'Dockerfile*'

jobs:
run-smoke-test-prod:
Expand All @@ -21,7 +21,10 @@ jobs:
with:
comment_on_pr: false
- uses: actions/checkout@v4
# - uses: ./.github/actions/rebase
with:
fetch-depth: 0
- name: Merge with latest main
uses: ./.github/actions/merge
- name: Install k3d
env:
K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh
Expand All @@ -38,7 +41,7 @@ jobs:
run: |
set -o pipefail
./.github/scripts/setup-busola.sh | tee busola-build.log
env:
env:
ENV: prod
- name: run_tests
shell: bash
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/pull-smoke-test-stage.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: PR Kyma Dashboard Smoke Tests Stage

on:
on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/pull-smoke-test-stage.yml"
- "resources/**"
- "tests/kyma/**"
- "nginx/**"
- "src/**"
- "kyma/**"
- "Dockerfile*"
- '.github/workflows/pull-smoke-test-stage.yml'
- 'resources/**'
- 'tests/kyma/**'
- 'nginx/**'
- 'src/**'
- 'kyma/**'
- 'Dockerfile*'

jobs:
run-smoke-test-stage:
Expand All @@ -21,7 +21,10 @@ jobs:
with:
comment_on_pr: false
- uses: actions/checkout@v4
# - uses: ./.github/actions/rebase
with:
fetch-depth: 0
- name: Merge with latest main
uses: ./.github/actions/merge
- name: Install k3d
env:
K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh
Expand All @@ -36,7 +39,7 @@ jobs:
shell: bash
run: |
./.github/scripts/setup-busola.sh | tee busola-build.log
env:
env:
ENV: stage
- name: Run tests
shell: bash
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pull-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
with:
comment_on_pr: false
- uses: actions/checkout@v4
# - uses: ./.github/actions/rebase
with:
fetch-depth: 0
- name: Merge with latest main
uses: ./.github/actions/merge
- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down
Loading