Skip to content

Commit 49c829a

Browse files
committed
docker/ci: fix building for branches
1 parent b56f596 commit 49c829a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/docker-image.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
- name: Build and push
1818
uses: docker/build-push-action@v6
1919
with:
20-
tags: manio/aa-proxy-rs:latest
20+
build-args: |
21+
GH_BRANCH=${{ github.ref_name }}
22+
tags: manio/aa-proxy-rs:${{ github.ref_name }}
2123
allow: security.insecure
2224
outputs: build
2325
- name: Upload a Build Artifact

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# syntax=docker/dockerfile:1-labs
2+
ARG GH_BRANCH=main
23
FROM rust:latest AS stage-rust
34
# crosscompile stuff
45
RUN apt update && apt upgrade -y
56
RUN apt install -y gcc-arm-linux-gnueabihf
67
RUN rustup target add arm-unknown-linux-gnueabihf
78
# cloning and building
89
WORKDIR /usr/src/app
9-
RUN git clone --branch bt-tryfix https://github.com/manio/aa-proxy-rs .
10+
RUN git clone --branch "$GH_BRANCH" --single-branch https://github.com/manio/aa-proxy-rs .
1011
RUN cargo build --release
1112
RUN arm-linux-gnueabihf-strip target/arm-unknown-linux-gnueabihf/release/aa-proxy-rs
1213
# Pi Zero W needs special linking/building (https://github.com/manio/aa-proxy-rs/issues/3)

0 commit comments

Comments
 (0)