Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actions testing #29

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ name: docker-build
on:
push:
branches:
- main
- '*'
workflow_dispatch:
pull_request:
branches:
- '**' # matches every branch

jobs:
multi-arch-push:
runs-on: ubuntu-latest
multi-arch-docker:
runs-on: ubicloud-standard-4
steps:
-
name: Checkout
Expand Down Expand Up @@ -49,7 +53,7 @@ jobs:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/s390x,linux/ppc64le,linux/riscv64
push: true
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
erisamoe/cloudflared:latest
erisamoe/cloudflared:${{ steps.previoustag.outputs.tag }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apk --no-cache add git build-base bash
ENV GO111MODULE=on \
CGO_ENABLED=0

ARG VERSION=2024.12.2
ARG VERSION=2025.1.0
RUN git clone https://github.com/cloudflare/cloudflared --depth=1 --branch ${VERSION} .
RUN bash -x .teamcity/install-cloudflare-go.sh

Expand All @@ -21,7 +21,7 @@ ARG TARGETARCH
ARG TARGETVARIANT
# Fixes execution on linux/arm/v6 for devices that don't support armv7 binaries
RUN if [ "${TARGETVARIANT}" = "v6" ] && [ "${TARGETARCH}" = "arm" ]; then export GOARM=6; fi; \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make LINK_FLAGS="-w -s" cloudflared
GOOS=${TARGETOS} GOARCH=${TARGETARCH} CONTAINER_BUILD=1 make LINK_FLAGS="-w -s" cloudflared

# Runtime container
FROM scratch
Expand Down