diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8da7874..f13d224 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} + GH_ACTION_VERSION: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }} - name: Run Tests Against LocalStack run: | @@ -59,7 +59,7 @@ jobs: } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} + GH_ACTION_VERSION: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }} - name: Run Version Test Against LocalStack run: | @@ -86,7 +86,7 @@ jobs: } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} + GH_ACTION_VERSION: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }} - name: Run AWS commands run: | @@ -104,7 +104,7 @@ jobs: } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} + GH_ACTION_VERSION: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }} local-state-test: name: 'Test Local State Action' @@ -129,7 +129,7 @@ jobs: } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} + GH_ACTION_VERSION: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }} - name: Run AWS Commands run: | @@ -150,4 +150,4 @@ jobs: } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} + GH_ACTION_VERSION: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }} diff --git a/.github/workflows/ephemeral.yml b/.github/workflows/ephemeral.yml index 58dbcee..ffefdb4 100644 --- a/.github/workflows/ephemeral.yml +++ b/.github/workflows/ephemeral.yml @@ -1,5 +1,10 @@ name: LocalStack Ephemeral Instance Test -on: pull_request +on: + pull_request: + paths-ignore: + - ./*.md + - LICENSE + workflow_dispatch: jobs: preview-test: @@ -26,7 +31,7 @@ jobs: } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} + GH_ACTION_VERSION: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }} PREVIEW_CMD: |- awslocal s3 mb s3://test-bucket awslocal sqs create-queue --queue-name=test-queue @@ -78,4 +83,4 @@ jobs: } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} + GH_ACTION_VERSION: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }}