Skip to content

Commit b8424b5

Browse files
Improve workflows when used with private repo (#10)
* make workflows more compatible with private repos * fix dockerfile not building
1 parent 90a88df commit b8424b5

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

.github/workflows/lint-go.yml

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
runs-on: ubuntu-latest
6262
timeout-minutes: 15
6363
permissions:
64+
contents: read
6465
pull-requests: read
6566
steps:
6667
- name: Checkout code

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
runs-on: ubuntu-latest
5151
timeout-minutes: 15
5252
permissions:
53+
contents: read
5354
id-token: write
5455
packages: write
5556
steps:

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,6 @@ jobs:
7171
- name: Ensure Docker image builds
7272
uses: docker/build-push-action@v3
7373
with:
74+
load: true
7475
push: false
7576
tags: ghcr.io/${{ github.repository }}:build-test

Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ COPY . /build
44
WORKDIR /build
55

66
# add git so VCS info will be stamped in binary
7-
RUN apk add --no-cache git=2.36.3-r0
7+
# ignore warning that a specific version of git isn't pinned
8+
# hadolint ignore=DL3018
9+
RUN apk add --no-cache git
810

911
# build as PIE to take advantage of exploit mitigations
1012
ARG CGO_ENABLED=0

0 commit comments

Comments
 (0)