Commit d1c82ef 1 parent 8cdd043 commit d1c82ef Copy full SHA for d1c82ef
File tree 4 files changed +18
-2
lines changed
4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 40
40
with :
41
41
fetch-depth : 0
42
42
43
+ - name : Get the last commit short SHA
44
+ run : |
45
+ SHORT_SHA=$(git rev-parse --short HEAD)
46
+ echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV
47
+ if [[ -f packages/app/src/build-metadata.json ]]; then
48
+ repo="${{ github.repository }}"
49
+ now="$(date -u +%FT%TZ)"
50
+ sed -i packages/app/src/build-metadata.json -r \
51
+ -e 's|("Last Commit:.+)|"Last Commit: '$repo' @ '$SHORT_SHA'"|'
52
+ fi
53
+
43
54
- name : Build and Push with Buildx
44
55
uses : ./.github/actions/docker-build
45
56
with :
Original file line number Diff line number Diff line change 51
51
run : |
52
52
SHORT_SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})
53
53
echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV
54
+ if [[ -f packages/app/src/build-metadata.json ]]; then
55
+ repoPR="${{ github.repository }}/pull/${{ github.event.number }}"
56
+ now="$(date -u +%FT%TZ)"
57
+ sed -i packages/app/src/build-metadata.json -r \
58
+ -e 's|("Last Commit:.+)|"Last Commit: '$repoPR' @ '$SHORT_SHA'"|'
59
+ fi
54
60
55
61
- name : Build and Push with Buildx
56
62
uses : ./.github/actions/docker-build
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env sh
2
2
. " $( dirname -- " $0 " ) /_/husky.sh"
3
3
4
- npm run versions:metadata
5
4
npm run lint-staged
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export function updateBuildMetadata(backstageVersion) {
31
31
const card = [
32
32
`RHDH Version: ${ rhdhVersion } ` ,
33
33
`Backstage Version: ${ backstageVersion } ` ,
34
- `Last Commit: ${ commitTime } ` ,
34
+ `Last Commit: repo @ ${ commitTime } ` ,
35
35
] ;
36
36
buildMetadata . card = card ;
37
37
You can’t perform that action at this time.
0 commit comments