I’m having a problem implementing my workflow in a single action file:
I want to run:
* only step1 on every push to feature branch (other than master)
* only step1 on a pull request
* step1 and step2 on merge
This is my pipeline:
name: Test on: push: branches-ignore: - master pull_request: jobs: build: name: Testing runs-on: ubuntu-latest steps: - name: Step 1 run: | echo " Step 1" - name: Step 2 if: github.event.pull_request.merged == true run: | echo " Step 2"
I can implement my requirements with 2 files but I would like to keep it in one if that is possible.