feat: add dynamic build branch argument for Docker image creation

This commit is contained in:
troyeguo
2026-05-16 15:05:03 +08:00
parent a05e5c0aa9
commit 53a5e0bdad
2 changed files with 3 additions and 1 deletions

View File

@@ -70,6 +70,7 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: BUILD_BRANCH=${{ github.ref_name }}
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker

View File

@@ -7,8 +7,9 @@ WORKDIR /app
# RUN tarball_url=$(curl -s https://api.github.com/repos/koodo-reader/koodo-reader/releases/latest | jq -r ".tarball_url") \
# && wget -qO- $tarball_url \
# | tar xvfz - --strip 1
ARG BUILD_BRANCH=master
RUN git clone https://github.com/koodo-reader/koodo-reader.git . && \
git checkout master
git checkout ${BUILD_BRANCH}
### --network-timeout 1000000 as a workaround for slow devices
### when the package being installed is too large, Yarn assumes it's a network problem and throws an error