Skip to content

Commit d2a65a0

Browse files
committed
add alpine edge
1 parent f101c55 commit d2a65a0

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
alpine_version:
31+
- 'edge'
3132
- '3.20'
3233
- '3.21'
3334

@@ -44,7 +45,12 @@ jobs:
4445
id: prep
4546
run: |
4647
ALPINE_VERSION="${{ matrix.alpine_version }}"
47-
BUILD_ARG="${ALPINE_VERSION}"
48+
ALPINE_RELEASE=$ALPINE_VERSION
49+
50+
if [[ "$ALPINE_VERSION" != "edge" ]]; then
51+
ALPINE_RELEASE="v$ALPINE_VERSION"
52+
fi
53+
4854
IMAGE_VERSION=$(curl -s "https://api.github.com/repos/${{ github.repository }}/tags" | jq -r '.[0].name')
4955
5056
LATEST=""
@@ -56,8 +62,8 @@ jobs:
5662
5763
echo "image_version=$IMAGE_VERSION" >> "$GITHUB_OUTPUT"
5864
echo "alpine_version=$ALPINE_VERSION" >> "$GITHUB_OUTPUT"
65+
echo "alpine_release=$ALPINE_RELEASE" >> "$GITHUB_OUTPUT"
5966
echo "latest=$LATEST" >> "$GITHUB_OUTPUT"
60-
echo "build_arg=$BUILD_ARG" >> "$GITHUB_OUTPUT"
6167
6268
- name: Set up QEMU
6369
id: qemu
@@ -105,7 +111,7 @@ jobs:
105111
with:
106112
context: .
107113
platforms: linux/amd64,linux/arm64
108-
build-args: ALPINE_VERSION=${{ steps.prep.outputs.build_arg }}
114+
build-args: ALPINE_VERSION=${{ steps.prep.outputs.alpine_version }},ALPINE_RELEASE=${{ steps.prep.outputs.alpine_release }}
109115
push: ${{ github.event_name != 'pull_request' }}
110116
labels: ${{ steps.meta.outputs.labels }}
111117
tags: ${{ steps.meta.outputs.tags }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ FROM alpine:${ALPINE_VERSION} AS build-stage
44

55
ARG TARGETARCH
66
ARG TARGETVARIANT
7-
ARG ALPINE_VERSION
7+
ARG ALPINE_RELEASE
88

9-
ENV REL=v${ALPINE_VERSION}
9+
ENV REL=${ALPINE_RELEASE}
1010
ENV ROOTFS=/root-out
1111
ENV MIRROR=http://dl-cdn.alpinelinux.org/alpine
1212
ENV PACKAGES=alpine-baselayout,\

0 commit comments

Comments
 (0)