Merge pull request #646 from rehanone/fix-docker-deplyment

Fix for the failing CD build
This commit is contained in:
Zack 2024-02-06 08:05:08 -08:00 committed by GitHub
commit 4d083f8d10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 10 deletions

View File

@ -10,8 +10,8 @@ jobs:
name: Go unit tests name: Go unit tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions/setup-go@v4 - uses: actions/setup-go@v5
with: with:
go-version: '1.20' go-version: '1.20'
- run: go version - run: go version

View File

@ -24,11 +24,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v5
with: with:
images: schollz/croc images: schollz/croc
# generate Docker tags based on the following events/attributes # generate Docker tags based on the following events/attributes
@ -41,20 +41,20 @@ jobs:
type=sha type=sha
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v3 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile

View File

@ -1,5 +1,5 @@
FROM golang:1.19-alpine as builder FROM golang:1.20-alpine as builder
RUN apk add --no-cache git RUN apk add --no-cache git gcc musl-dev
WORKDIR /go/croc WORKDIR /go/croc
COPY . . COPY . .
RUN go build -v -ldflags="-s -w" RUN go build -v -ldflags="-s -w"