Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add rev range debug output and fix fetch_depth #27

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:

- name: Push commits + 1
if: ${{ github.event_name == 'push' }}
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.commits }} + 1 ))" >> "${GITHUB_ENV}"
env:
COMMITS_JSON: ${{ toJson(github.event.commits) }}
run: echo "PR_FETCH_DEPTH=$(( $(echo ${COMMITS_JSON}| jq length) + 1 ))" >> "${GITHUB_ENV}"

- name: Check out PR branch and its commits
uses: actions/checkout@v4
Expand All @@ -37,6 +39,16 @@ jobs:
run: |
git fetch origin ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.event.base_ref }}

- name: Debug before and after properties
env:
COMMIT_BEFORE: ${{ github.event.before }}
COMMIT_AFTER: ${{ github.event.after }}
run: |
echo "github.event.before: ${{ github.event.before }}"
echo "github.event.after: ${{ github.event.after }}"
echo "COMMIT_BEFORE: ${COMMIT_BEFORE}"
echo "COMMIT_AFTER: ${COMMIT_AFTER}"

- name: Check for container rebuild
if: ${{ github.event.before != '' && github.event.after != '' }}
run: |
Expand Down
Loading