File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 25
25
if : ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
26
26
outputs :
27
27
components : ${{ steps.components.outputs.components }}
28
+ release-name : ${{ steps.release-name.outputs.release-name }}
28
29
steps :
30
+ - uses : actions/checkout@v3
29
31
- id : components
30
32
run : |
31
33
COMPONENT_NAME=$(echo ${{ github.event_name == 'workflow_run' && github.event.workflow_run.name || inputs.component-name }} | awk '{ print $NF }')
36
38
esac
37
39
38
40
echo "::set-output name=components::$COMPONENTS"
41
+ - id : release-name
42
+ run : |
43
+ RELEASE_NAME=${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '$(git describe --tags)' }}
44
+ echo "::set-output name=release-name::${RELEASE_NAME#v}"
39
45
40
46
build :
41
47
runs-on : ubuntu-latest
68
74
context : ${{ env.CONTEXT }}
69
75
push : true
70
76
platforms : linux/amd64,linux/arm64
77
+ build-args : |
78
+ BUILDVERSION=${{ needs.prepare.outputs.release-name }}
79
+ TELEMETRY_WRITE_KEY=${{ secrets.TELEMETRY_WRITE_KEY }}
71
80
tags : ${{ steps.metadata.outputs.tags }}
72
81
labels : ${{ steps.metadata.outputs.labels }}
73
82
cache-from : type=registry,ref=${{ env.IMAGE }}:edge
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ builds:
13
13
-X github.com/infrahq/infra/internal.Version={{ .Version }}
14
14
-X github.com/infrahq/infra/internal.Commit={{ .FullCommit }}
15
15
-X github.com/infrahq/infra/internal.Date={{ .Date }}
16
+ -X github.com/infrahq/infra/internal.Prerelease=
17
+ -X github.com/infrahq/infra/internal.Metadata=
16
18
binary : infra
17
19
main : ./main.go
18
20
goos :
You can’t perform that action at this time.
0 commit comments