diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3dc81d1..b6c48d2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,7 +14,7 @@ jobs: security-events: write steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e93af4c..5532bc0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,20 +11,20 @@ jobs: with: go-version: "1.20" - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Lint code uses: golangci/golangci-lint-action@v3 - name: Run tests run: make test - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: cloudlena - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up container image build - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build and push container image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: push: true tags: cloudlena/s3manager:latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28ca692..412d104 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,10 +13,10 @@ jobs: - uses: actions/setup-go@v4 with: go-version: "1.20" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: golangci/golangci-lint-action@v3 - run: make test - - uses: goreleaser/goreleaser-action@v4 + - uses: goreleaser/goreleaser-action@v5 with: args: release --rm-dist env: diff --git a/Dockerfile b/Dockerfile index c82884a..2b4a986 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM docker.io/golang:1 AS builder +FROM docker.io/library/golang:1 AS builder WORKDIR /usr/src/app COPY . ./ RUN CGO_ENABLED=0 go build -ldflags="-s -w" -a -installsuffix cgo -o bin/s3manager -FROM docker.io/alpine:latest +FROM docker.io/library/alpine:latest WORKDIR /usr/src/app RUN addgroup -S s3manager && adduser -S s3manager -G s3manager RUN apk add --no-cache \