diff --git a/.github/actions/rebase/action.yml b/.github/actions/merge/action.yml similarity index 74% rename from .github/actions/rebase/action.yml rename to .github/actions/merge/action.yml index 4e6d0cec0b..ea3bc1773f 100644 --- a/.github/actions/rebase/action.yml +++ b/.github/actions/merge/action.yml @@ -1,5 +1,5 @@ -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' @@ -7,8 +7,8 @@ runs: # 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 @@ -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 diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 507a1291ae..d368ee1067 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -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: diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 6a7bf6a951..ed655c1f5e 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -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 diff --git a/.github/workflows/lint-check-pr.yml b/.github/workflows/lint-check-pr.yml index 6bec9a1185..b8f113b975 100644 --- a/.github/workflows/lint-check-pr.yml +++ b/.github/workflows/lint-check-pr.yml @@ -1,6 +1,6 @@ name: PR Lint Check -on: +on: pull_request: types: [opened, edited, synchronize, reopened, ready_for_review] @@ -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 diff --git a/.github/workflows/lint-markdown-links-daily.yml b/.github/workflows/lint-markdown-links-daily.yml index 3f6c8f7ea6..1b68aa4f8a 100644 --- a/.github/workflows/lint-markdown-links-daily.yml +++ b/.github/workflows/lint-markdown-links-daily.yml @@ -1,9 +1,9 @@ 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 @@ -11,7 +11,7 @@ jobs: - 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: '.' diff --git a/.github/workflows/lint-markdown-links-pr.yml b/.github/workflows/lint-markdown-links-pr.yml index c7d7f7ee6b..f8e7ce7848 100644 --- a/.github/workflows/lint-markdown-links-pr.yml +++ b/.github/workflows/lint-markdown-links-pr.yml @@ -1,6 +1,6 @@ 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 @@ -8,7 +8,7 @@ jobs: - 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: '.' diff --git a/.github/workflows/pull-integration-cluster-k3d.yml b/.github/workflows/pull-integration-cluster-k3d.yml index 59448643e5..46990fb972 100644 --- a/.github/workflows/pull-integration-cluster-k3d.yml +++ b/.github/workflows/pull-integration-cluster-k3d.yml @@ -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: @@ -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 diff --git a/.github/workflows/pull-integration-namespace-k3d.yml b/.github/workflows/pull-integration-namespace-k3d.yml index cd545f8699..7089475f0f 100644 --- a/.github/workflows/pull-integration-namespace-k3d.yml +++ b/.github/workflows/pull-integration-namespace-k3d.yml @@ -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: @@ -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 diff --git a/.github/workflows/pull-kyma-integration-tests.yml b/.github/workflows/pull-kyma-integration-tests.yml index 2aebbfe2f4..f73c3c36e4 100644 --- a/.github/workflows/pull-kyma-integration-tests.yml +++ b/.github/workflows/pull-kyma-integration-tests.yml @@ -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 @@ -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 diff --git a/.github/workflows/pull-lighthouse.yml b/.github/workflows/pull-lighthouse.yml index 36b319c463..395eb0ac79 100644 --- a/.github/workflows/pull-lighthouse.yml +++ b/.github/workflows/pull-lighthouse.yml @@ -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: @@ -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 diff --git a/.github/workflows/pull-smoke-test-prod.yml b/.github/workflows/pull-smoke-test-prod.yml index 8b35baa56e..98dca94a77 100644 --- a/.github/workflows/pull-smoke-test-prod.yml +++ b/.github/workflows/pull-smoke-test-prod.yml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/pull-smoke-test-stage.yml b/.github/workflows/pull-smoke-test-stage.yml index 2fe2d11463..2b076d9f3f 100644 --- a/.github/workflows/pull-smoke-test-stage.yml +++ b/.github/workflows/pull-smoke-test-stage.yml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/pull-unit-tests.yml b/.github/workflows/pull-unit-tests.yml index 62431406bf..67f5a933fb 100644 --- a/.github/workflows/pull-unit-tests.yml +++ b/.github/workflows/pull-unit-tests.yml @@ -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