Merge branch 'main' of https://github.com/xruins/docker_state_exporter
This commit is contained in:
@@ -8,7 +8,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/setup-go@v5
|
||||
|
||||
@@ -11,6 +11,9 @@ on:
|
||||
jobs:
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
env:
|
||||
IMAGE_NAME: docker_state_exporter
|
||||
steps:
|
||||
@@ -22,7 +25,7 @@ jobs:
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ COPY go.* $GOPATH/src/mypackage/myapp/
|
||||
WORKDIR $GOPATH/src/mypackage/myapp/
|
||||
RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/docker_state_exporter
|
||||
|
||||
FROM gcr.io/distroless/base-debian11
|
||||
FROM gcr.io/distroless/base-debian12
|
||||
COPY --from=builder /go/bin/docker_state_exporter /go/bin/docker_state_exporter
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/go/bin/docker_state_exporter"]
|
||||
|
||||
Reference in New Issue
Block a user