This repository was archived by the owner on May 27, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 - os : ubuntu-latest
3535 rid : linux-x64
3636 binary-extension : ' '
37-
37+
3838 env :
3939 RUNTIME_IDENTIFIER : ${{ matrix.rid }}
4040
6060 with :
6161 name : Lagrange.Milky-${{ matrix.rid }}
6262 path : Lagrange.Milky/bin/Release/net9.0/${{ matrix.rid }}/publish/Lagrange.Milky${{ matrix.binary-extension }}
63+
64+ docker :
65+ needs : build
66+ runs-on : ubuntu-latest
67+ if : github.event_name != 'pull_request'
68+
69+ steps :
70+ - uses : actions/checkout@v4
71+
72+ - name : Download build artifact
73+ uses : actions/download-artifact@v4
74+ with :
75+ name : Lagrange.Milky-linux-x64
76+ path : Lagrange.Milky/bin/Release/net9.0/linux-x64/publish/Lagrange.Milky
77+
78+ - name : Set up Docker Buildx
79+ uses : docker/setup-buildx-action@v3
80+
81+ - name : Login to Github Registry
82+ uses : docker/login-action@v3
83+ with :
84+ registry : ghcr.io
85+ username : ${{ github.repository_owner }}
86+ password : ${{ secrets.GITHUB_TOKEN }}
87+
88+ - name : Extract metadata (tags, labels) for Docker
89+ id : meta
90+ uses : docker/metadata-action@v5
91+ with :
92+ images : |
93+ ghcr.io/${{ github.repository_owner }}/lagrange.milky
94+ tags : |
95+ type=edge
96+ type=sha,event=branch
97+ type=ref,event=tag
98+
99+ - name : Build and push
100+ uses : docker/build-push-action@v5
101+ with :
102+ context : .
103+ file : " Lagrange.Milky/Resources/Dockerfile"
104+ push : true
105+ tags : ${{ steps.meta.outputs.tags }}
106+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ FROM scratch
2+
3+ WORKDIR /app/data
4+
5+ COPY --link --from=tianon/gosu /gosu /usr/local/bin/
6+ COPY --link Lagrange.Milky/Resources/docker-entrypoint.sh /app/bin/docker-entrypoint.sh
7+ RUN chmod +x /app/bin/docker-entrypoint.sh
8+
9+ COPY --link Lagrange.Milky/bin/Release/net9.0/linux-x64/publish/Lagrange.Milky /app/bin
10+
11+ ENTRYPOINT ["/app/bin/docker-entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ USER_ID=${UID:- 0}
4+
5+ if [ " $USER_ID " -ne 0 ]; then
6+ chown -R $USER_ID /app/data
7+ useradd --shell /bin/sh -u $USER_ID -o -c " " -m user
8+ usermod -a -G root user
9+ export HOME=/home/user
10+ exec /usr/sbin/gosu user /app/bin/Lagrange.Milky " $@ "
11+ else
12+ exec /app/bin/Lagrange.Milky " $@ "
13+ fi
You can’t perform that action at this time.
0 commit comments