@@ -48,11 +48,20 @@ jobs:
48
48
- name : Gather build dependencies
49
49
id : godeps
50
50
run : |
51
+ if [ -z ${{inputs.branch}} ]; then
52
+ echo "No branch input provided, using current branch: $GITHUB_REF_NAME"
53
+ else
54
+ echo "Checking out branch: ${{inputs.branch}}"
55
+ git checkout ${{inputs.branch}}
56
+ fi
57
+ echo "Current branch: $GITHUB_REF_NAME"
58
+ echo "branch_name=$GITHUB_REF_NAME" >> $GITHUB_ENV
51
59
GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//')
52
60
echo "GO_VERSION=$GO_VERSION" >> $GITHUB_ENV
53
- time_start=$(date +%s)
61
+ echo "GO_VERSION=$GO_VERSION"
62
+ echo "time_start=$(date +%s)" >> $GITHUB_ENV
54
63
OSARCH=${{matrix.osarch}} make build
55
- time_end=$(date +%s)
64
+ echo " time_end=$(date +%s)" >> $GITHUB_ENV
56
65
echo "Build time: $((time_end - time_start)) seconds"
57
66
58
67
echo "Getting sha256sum of the built nginx-agent binary..."
67
76
id : assertiondoc
68
77
uses : nginxinc/compliance-rules/.github/actions/assertion@main
69
78
with :
70
- artifact-name : nginx-agent_${{ github.ref_name }}_${{ matrix.osarch }}
79
+ artifact-name : nginx-agent_${{ env.branch_name }}_${{ matrix.osarch }}
71
80
artifact-digest : ${{ env.agent-digest }}
72
81
build-type : ' github'
73
82
builder-id : ' github.com'
@@ -77,10 +86,10 @@ jobs:
77
86
artifactory-api-token : ${{ secrets.ARTIFACTORY_TOKEN }}
78
87
artifactory-url : ${{ secrets.ARTIFACTORY_URL }}
79
88
artifactory-repo : ' f5-nginx-go-local-approved-dependency'
80
- assertion-doc-file : assertion_nginx-agent_test_ ${{matrix.osarch}}.json
89
+ assertion-doc-file : assertion_nginx-agent_${{env.branch_name}}_ ${{matrix.osarch}}.json
81
90
build-content-path : ${{ env.goversionm }}
82
- started-on : ' '
83
- finished-on : ' '
91
+ started-on : ' ${{ env.time_start }} '
92
+ finished-on : ' ${{ env.time_end }} '
84
93
85
94
- name : Sign and Store Assertion Document
86
95
id : sign
0 commit comments