name: e2e-tests
on:
  push:
    branches:
      - master
  pull_request:
jobs:
  run-e2e-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: make -f x.mk e2e-local NODES=2 JUNIT_DIRECTORY=./artifacts/
      - name: Archive production artifacts # test results are only uploaded if any of the e2e tests fails
        if: ${{ failure() }}
        uses: actions/upload-artifact@v2
        with:
          name: e2e-test-output-${{ github.sha }}-${{ github.run_id }}
          path: ${{ github.workspace }}/bin/artifacts/*

name: e2e-tests
on:
  push:
    branches:
      - master
  pull_request:
jobs:
  run-e2e-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: make -f x.mk e2e-local NODES=2 JUNIT_DIRECTORY=./artifacts/
      - name: Archive production artifacts # test results are only uploaded if any of the e2e tests fails
        if: ${{ failure() }}
        uses: actions/upload-artifact@v2
        with:
          name: e2e-test-output-${{(github.event.pull_request.head.sha||github.sha)}}-${{ github.run_id }}
          path: ${{ github.workspace }}/bin/artifacts/*

Use PR head commit in artifact naming instead of merge commit
fix: Use PR head commit in artifact naming instead of merge commit

The env var GITHUB_SHA shows merge commit and is not related to worflow trigger unlike the discription on GITHUB. This fix changes the variable to look at the head commit aka. the commit that actually triggers the workflow.
