Skip to content

Commit

Permalink
Revert "Switching to docker buildx to build multi arch image" as we w…
Browse files Browse the repository at this point in the history
…ill push it in a separate branch

This reverts commit c182bd6.
  • Loading branch information
cmoulliard committed Dec 4, 2023
1 parent c182bd6 commit 67d91bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/build-push-image-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,18 @@ on:
branches: [ main ]
push:
branches:
#- main
- 'issue-*'
- main
jobs:
build_push_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

#- name: Install go 1.16
# uses: actions/setup-go@v2
# with:
# go-version: 1.16
- name: Install go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Login to Quay.io Hub
uses: docker/login-action@v1
Expand All @@ -31,7 +27,7 @@ jobs:
- name: Build the container image
run: |
VERSION=$(git rev-parse --short HEAD 2>/dev/null)
docker buildx build --platform linux/amd64,linux/arm64 -t cert-manager-webhook-godaddy:${VERSION} -f Dockerfile .
docker build -t cert-manager-webhook-godaddy:${VERSION} -f Dockerfile .
TAG_ID=$(docker images -q cert-manager-webhook-godaddy:${VERSION})
docker tag ${TAG_ID} quay.io/snowdrop/cert-manager-webhook-godaddy:${VERSION}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ WORKDIR /go/src/webhook-app
COPY . .
RUN --mount=type=cache,target=$HOME/go/pkg/mod go mod download

ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /webhook-app -ldflags '-w -extldflags "-static"' .
RUN CGO_ENABLED=0 go build -o /webhook-app -ldflags '-w -extldflags "-static"' .

FROM alpine:3

Expand Down

0 comments on commit 67d91bb

Please sign in to comment.