Skip to content

Commit

Permalink
Ci: carbonix_build commit id fix for PR.
Browse files Browse the repository at this point in the history
This fixes the bug where the PR commit in the folder name does not
matches the one in the build.
  • Loading branch information
loki077 committed Dec 27, 2024
1 parent 83e9548 commit 4c51751
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/carbonix_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# PR runs, by default, create a merge commit and then checkout the merge commit. We don't want that.
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}

- name: Extract firmware version, commit id, and branch name
id: extract_info
Expand Down Expand Up @@ -196,6 +199,10 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
# PR runs, by default, create a merge commit and then checkout the merge commit. We don't want that.
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
submodules: 'recursive'

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
Expand Down Expand Up @@ -248,6 +255,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# PR runs, by default, create a merge commit and then checkout the merge commit. We don't want that.
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}

- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
Expand Down Expand Up @@ -276,6 +286,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
# PR runs, by default, create a merge commit and then checkout the merge commit. We don't want that.
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
submodules: 'recursive'

- name: Install bash tools
Expand Down Expand Up @@ -336,6 +348,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
# PR runs, by default, create a merge commit and then checkout the merge commit. We don't want that.
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
submodules: 'recursive'
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
Expand Down

0 comments on commit 4c51751

Please sign in to comment.