From 4078a127875a185b11c046c7c8b301e50c3f451e Mon Sep 17 00:00:00 2001 From: Matej Almasi <¨almasi.mato@gmail.com¨> Date: Mon, 9 Dec 2024 22:12:40 +0100 Subject: [PATCH] Add push event trigger and merge simulation for PR workflow --- .github/workflows/pr-main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/pr-main.yml b/.github/workflows/pr-main.yml index 9cc4a45..e64e714 100644 --- a/.github/workflows/pr-main.yml +++ b/.github/workflows/pr-main.yml @@ -4,6 +4,9 @@ on: pull_request: branches: - main + push: + branches: + - main env: CARGO_TERM_COLOR: always @@ -33,6 +36,12 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Merge PR branch into main + if: ${{ github.event_name == 'pull_request'}} + run: | + git fetch origin ${{ github.event.pull_request.head.ref }} + git merge FETCH_HEAD -m "CI Merge Simulation" + - name: Set up Rust uses: actions-rust-lang/setup-rust-toolchain@v1