diff --git a/.github/actions/rebase/action.yaml b/.github/actions/rebase/action.yaml deleted file mode 100644 index 1c84b38ac..000000000 --- a/.github/actions/rebase/action.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: 'Rebase' -description: 'Action for rebasing to the 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" - shell: bash - - # Update origin/main branch locally to cover case when repo is not fully cloned - # for example when using `actions/checkout@v4` action with default `fetch-depth` value (1) - # read more: https://github.com/actions/checkout?tab=readme-ov-file#usage - - name: Update origin/main - run: | - git fetch origin main - git checkout origin/main - git checkout -B main - git pull --unshallow origin main - - # go back to the HEAD commit - git switch --detach ${{ github.sha }} - shell: bash - - - name: Rebase to main - run: | - git rebase main - shell: bash - - - name: Print branch log - run: | - git log origin/main~1.. - shell: bash diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml index beeb7869c..8d1c1e85e 100644 --- a/.github/workflows/gitleaks.yaml +++ b/.github/workflows/gitleaks.yaml @@ -11,7 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase - name: Fetch gitleaks ${{ env.GITLEAKS_VERSION }} run: curl -Lso gitleaks.tar.gz https://github.com/gitleaks/gitleaks/releases/download/v${{ env.GITLEAKS_VERSION }}/gitleaks_${{ env.GITLEAKS_VERSION }}_linux_x64.tar.gz && tar -xvzf ./gitleaks.tar.gz - name: Run gitleaks diff --git a/.github/workflows/images-verify.yaml b/.github/workflows/images-verify.yaml index 89d5a6e89..b006a96e6 100644 --- a/.github/workflows/images-verify.yaml +++ b/.github/workflows/images-verify.yaml @@ -12,6 +12,8 @@ jobs: # check if developer doesn't change `main` images in the values.yaml and sec-scanners-config.yaml files verify-sec-scanner-and-values-files: runs-on: ubuntu-latest + if: github.event.pull_request.base.ref == 'main' + steps: - name: Checkout to main uses: actions/checkout@v4 diff --git a/.github/workflows/integration-tests-pull.yaml b/.github/workflows/integration-tests-pull.yaml index b59529581..05a981510 100644 --- a/.github/workflows/integration-tests-pull.yaml +++ b/.github/workflows/integration-tests-pull.yaml @@ -13,7 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase - uses: ./.github/actions/setup-go - uses: ./.github/actions/create-k3d-cluster - name: run test @@ -30,7 +29,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase - uses: ./.github/actions/setup-go - uses: ./.github/actions/create-k3d-cluster - name: run test diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 758ab891d..d2cf060cb 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -13,7 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase - uses: ./.github/actions/setup-go - uses: golangci/golangci-lint-action@v3 with: @@ -24,7 +23,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase - uses: ./.github/actions/setup-go - uses: ./.github/actions/setup-libgit2 - uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 56f2ed037..acee96c7f 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -9,7 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: use-quiet-mode: 'yes' diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index a11447af0..0a57af9cc 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -12,7 +12,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase - uses: ./.github/actions/setup-go - name: run test run: make -C components/operator test @@ -21,7 +20,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase - uses: ./.github/actions/setup-go - uses: ./.github/actions/setup-libgit2 - name: run test