File tree Expand file tree Collapse file tree 4 files changed +26
-4
lines changed
Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 5252 }
5353 }
5454
55+ - name : Set the commit_sha and branch
56+ shell : bash
57+ run : |
58+ echo "commit_sha=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
59+ echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"
60+
5561 - name : Set up QEMU
5662 uses : docker/setup-qemu-action@v3
5763
Original file line number Diff line number Diff line change 5252 }
5353 }
5454
55+ - name : Set the commit_sha and branch
56+ shell : bash
57+ run : |
58+ echo "commit_sha=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
59+ echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"
60+
5561 - name : Set up QEMU
5662 uses : docker/setup-qemu-action@v3
5763
Original file line number Diff line number Diff line change 2020 }
2121 }
2222
23+ - name : Set the commit_sha and branch
24+ shell : bash
25+ run : |
26+ echo "commit_sha=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
27+ echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"
28+
2329 - name : Set up QEMU
2430 uses : docker/setup-qemu-action@v3
2531
Original file line number Diff line number Diff line change @@ -15,12 +15,16 @@ ARG DRONE_COMMIT
1515# Build application
1616RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o /go/bin/httptest \
1717 -ldflags "-extldflags \" -static\" \
18- -X main.BuildBranch=${DRONE_BRANCH } \
19- -X main.BuildCommit=${DRONE_COMMIT:0:8 } \
18+ -X main.BuildBranch=${{ env.branch } } \
19+ -X main.BuildCommit=${{ env.commit_sha } } \
2020 -X main.BuildTime=$(date -Iseconds)"
2121
22- # Distroless; smaller than Alpine, has SSL included, works for multi-arch
23- FROM gcr.io/distroless/static-debian12
22+ # We can't use distroless because some teams need to add a bearer token to
23+ # authenticate when the tests are run
24+ FROM alpine
25+
26+ # Install dependencies
27+ RUN apk add --no-cache ca-certificates
2428
2529# Copy binary from build container
2630COPY --from=build /go/bin/httptest /bin/httptest
You can’t perform that action at this time.
0 commit comments