pull requests: use a meaningful branch when building
This change makes the build runner switch to a meaningful branch name, which will then appear as the "Firmware Branch" in the System Info of the web application. This helps users testing pull-request builds identify that they are actually using the changes from the respective pull request.
This commit is contained in:
parent
78e70cc6c5
commit
fe7e622e2d
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -60,6 +60,15 @@ jobs:
|
|||||||
- name: Get tags
|
- name: Get tags
|
||||||
run: git fetch --force --tags origin
|
run: git fetch --force --tags origin
|
||||||
|
|
||||||
|
- name: Create and switch to a meaningful branch for pull-requests
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
run: |
|
||||||
|
OWNER=${{ github.repository_owner }}
|
||||||
|
NAME=${{ github.event.repository.name }}
|
||||||
|
ID=${{ github.event.pull_request.number }}
|
||||||
|
DATE=$(date +'%Y%m%d%H%M')
|
||||||
|
git switch -c ${OWNER}/${NAME}/pr${ID}-${DATE}
|
||||||
|
|
||||||
- name: Cache pip
|
- name: Cache pip
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user