diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index bc888d66..0c5f54fa 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -87,6 +87,13 @@ jobs: - name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }} run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}" + + - name: Rebase to ${{ needs.init.outputs.base_ref }} + if: ${{ contains(needs.init.outputs.arg1, 'rebase') }} + run: | + git fetch origin ${{ needs.init.outputs.base_ref }}:${{ needs.init.outputs.base_ref }} + git status + git rebase origin/${{ needs.init.outputs.base_ref }} - name: Install dependencies & build env: @@ -95,13 +102,6 @@ jobs: run: | npm ci npm run build --if-present - - - name: Rebase to ${{ needs.init.outputs.base_ref }} - if: ${{ contains(needs.init.outputs.arg1, 'rebase') }} - run: | - git fetch origin ${{ needs.init.outputs.base_ref }}:${{ needs.init.outputs.base_ref }} - git status - git rebase origin/${{ needs.init.outputs.base_ref }} - name: Commit and push default if: ${{ !contains(needs.init.outputs.arg1, 'fixup') && !contains(needs.init.outputs.arg1, 'amend') }}