Skip to content

Commit f0924ce

Browse files
committed
Revert "switch to bake (#32)"
This reverts commit 348a4c4.
1 parent cea6557 commit f0924ce

File tree

3 files changed

+32
-48
lines changed

3 files changed

+32
-48
lines changed

.github/workflows/docker-build.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: docker-build
22

33
on:
44
push:
5-
pull_request:
5+
branches:
6+
- main
67

78
jobs:
89
multi-arch-push:
@@ -11,9 +12,19 @@ jobs:
1112
-
1213
name: Checkout
1314
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
1417
-
1518
name: Set up Docker Buildx
1619
uses: docker/setup-buildx-action@v3
20+
-
21+
name: Cache Docker layers
22+
uses: actions/cache@v4
23+
with:
24+
path: /tmp/.buildx-cache
25+
key: ${{ runner.os }}-buildx-${{ github.sha }}
26+
restore-keys: |
27+
${{ runner.os }}-buildx-
1728
-
1829
name: Login to GitHub Registry
1930
uses: docker/login-action@v3
@@ -28,12 +39,21 @@ jobs:
2839
username: erisamoe
2940
password: ${{ secrets.DOCKERHUB_TOKEN }}
3041
-
31-
name: Bake image
32-
uses: docker/bake-action@v6
33-
env:
34-
MULTI_PLATFORM: true
42+
name: Get Latest Tag
43+
id: previoustag
44+
uses: WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce # [email protected]
45+
-
46+
name: Build and push
47+
uses: docker/build-push-action@v5
3548
with:
36-
push: ${{ github.ref == 'ref/heads/main' }}
37-
set: |
38-
*.cache-from=type=gha
39-
*.cache-to=type=gha,mode=max
49+
context: .
50+
file: ./Dockerfile
51+
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/s390x,linux/ppc64le,linux/riscv64
52+
push: true
53+
tags: |
54+
erisamoe/cloudflared:latest
55+
erisamoe/cloudflared:${{ steps.previoustag.outputs.tag }}
56+
ghcr.io/erisa/cloudflared:latest
57+
ghcr.io/erisa/cloudflared:${{ steps.previoustag.outputs.tag }}
58+
cache-from: type=local,src=/tmp/.buildx-cache
59+
cache-to: type=local,dest=/tmp/.buildx-cache

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build container
2-
ARG GOVERSION=1.23
3-
ARG ALPINEVERSION
2+
ARG GOVERSION=1.23.8
3+
ARG ALPINEVERSION=3.21
44

55
FROM --platform=${BUILDPLATFORM} \
66
golang:$GOVERSION-alpine${ALPINEVERSION} AS build
@@ -11,7 +11,7 @@ RUN apk --no-cache add git build-base bash
1111
ENV GO111MODULE=on \
1212
CGO_ENABLED=0
1313

14-
ARG VERSION
14+
ARG VERSION=2025.4.2
1515
RUN git clone https://github.com/cloudflare/cloudflared --depth=1 --branch ${VERSION} .
1616
RUN bash -x .teamcity/install-cloudflare-go.sh
1717

docker-bake.hcl

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)