diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index b0c1714a..de78330c 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -23,7 +23,15 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Log Git State + run: | + echo "GITHUB_REF: $GITHUB_REF" + echo "GITHUB_SHA: $GITHUB_SHA" + echo "PR HEAD SHA: ${{ github.event.pull_request.head.sha }}" + git rev-parse --abbrev-ref HEAD + git log -1 --oneline - id: create_token uses: tibdex/github-app-token@v2 @@ -61,7 +69,7 @@ jobs: labels: "Invalid DNS" github_token: ${{ steps.create_token.outputs.token }} issue_number: ${{ github.event.pull_request.number }} - + - name: Remove Validated DNS Label if: ${{ github.event_name == 'pull_request' && failure() }} uses: actions-ecosystem/action-remove-labels@v1 @@ -76,7 +84,15 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Log Git State + run: | + echo "GITHUB_REF: $GITHUB_REF" + echo "GITHUB_SHA: $GITHUB_SHA" + echo "PR HEAD SHA: ${{ github.event.pull_request.head.sha }}" + git rev-parse --abbrev-ref HEAD + git log -1 --oneline - id: create_token uses: tibdex/github-app-token@v2 @@ -123,13 +139,23 @@ jobs: labels: "Validated JSON" github_token: ${{ steps.create_token.outputs.token }} issue_number: ${{ github.event.pull_request.number }} - + tests: name: Tests if: "!contains(github.event.head_commit.message, '[skip-ci]')" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Log Git State + run: | + echo "GITHUB_REF: $GITHUB_REF" + echo "GITHUB_SHA: $GITHUB_SHA" + echo "PR HEAD SHA: ${{ github.event.pull_request.head.sha }}" + git rev-parse --abbrev-ref HEAD + git log -1 --oneline - run: npm install