File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 60
60
include : LICENSE,README.md,huly-coder.yaml
61
61
tar : all
62
62
zip : windows
63
- token : ${{ secrets.GITHUB_TOKEN }}
63
+ token : ${{ secrets.GITHUB_TOKEN }}
64
+ upload-docker :
65
+ name : Build & Push Docker Image
66
+ runs-on : ubuntu-latest
67
+ steps :
68
+ - name : Checkout repository
69
+ uses : actions/checkout@v4
70
+
71
+ - name : Set up Docker Buildx
72
+ uses : docker/setup-buildx-action@v3
73
+
74
+ - name : Login to Docker Hub
75
+ uses : docker/login-action@v3
76
+ with :
77
+ username : ${{ secrets.DOCKER_USER }}
78
+ password : ${{ secrets.DOCKER_ACCESS_TOKEN }}
79
+
80
+ - run : echo VERSION=$(grep '^version =' Cargo.toml | cut -d '"' -f 2) >> $GITHUB_ENV
81
+
82
+ - name : Build and Push
83
+ uses : docker/build-push-action@v6
84
+ with :
85
+ file : Dockerfile
86
+ push : true
87
+ tags : " ${{ secrets.DOCKER_USER }}/huly-coder:${{ env.VERSION }},${{ secrets.DOCKER_USER }}/huly-coder:latest"
88
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 1
1
# Build stage
2
- FROM rust:1.86 AS builder
2
+ FROM --platform=$BUILDPLATFORM rust:1.86 AS builder
3
+ ARG TARGETPLATFORM
3
4
WORKDIR /usr/src/huly-coder
4
5
COPY . .
5
6
RUN cargo build --release
You can’t perform that action at this time.
0 commit comments