My repo has multiple branches that all accept pull requests. I want to be able to see which branch got changes merged to it after a PR is merged and then do some stuff accordingly. Is there a way in my GH Actions yaml file to see which branch got changes merged to it?
I’m thinking something like this but unsure:
jobs: build: runs-on: ubuntu-latest steps: # Fetch all branches - uses: actions/checkout@v2 - run: | git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* . . <do some stuff> . . - name: Publish commits to gh-pages if: github.ref == 'refs/remotes/origin/development/v2.2' && github.event.pull_request.merged run: do something
I’m not sure if I can use github.ref for this or if I can string together if expressions. If not, should I be nesting them?
Thanks in advance!