Skip to content

Commit

Permalink
update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yajuhua committed May 23, 2024
1 parent 663ff74 commit 1902925
Showing 1 changed file with 2 additions and 53 deletions.
55 changes: 2 additions & 53 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,7 @@ jobs:
# 构建 amd64 Docker镜像
- name: Build the amd64 Docker image
run: |
docker build . --file Dockerfile --tag yajuhua/podcast2:amd64-tmp --platform linux/amd64
docker run -id --name amd64-tmp yajuhua/podcast2:amd64-tmp /bin/sh
docker export -o rootfs.tar amd64-tmp
cat <<EOF > Dockerfile
FROM scratch
ADD rootfs.tar /
ENV JAVA_HOME=/usr/sbin/jre8
ENV PATH="$JAVA_HOME/bin:$PATH"
ENV LANG=C.UTF-8
ENV TZ=Asia/Shanghai
EXPOSE 8088
WORKDIR /
CMD ["java", "-jar", "app.jar"]
EOF
run: |
docker build . --file Dockerfile --tag yajuhua/podcast2:amd64-$(date +test-%Y-%m-%d) --platform linux/amd64
docker push yajuhua/podcast2:amd64-$(date +test-%Y-%m-%d)
Expand Down Expand Up @@ -123,23 +106,6 @@ jobs:
# 构建 arm64 Docker镜像
- name: Build the arm64 Docker image
run: |
docker build . --file Dockerfile --tag yajuhua/podcast2:arm64-tmp --platform linux/arm64
docker run -id --name arm64-tmp yajuhua/podcast2:arm64-tmp /bin/sh
docker export -o rootfs.tar arm64-tmp
cat <<EOF > Dockerfile
FROM scratch
ADD rootfs.tar /
ENV JAVA_HOME=/usr/sbin/jre8
ENV PATH="$JAVA_HOME/bin:$PATH"
ENV LANG=C.UTF-8
ENV TZ=Asia/Shanghai
EXPOSE 8088
WORKDIR /
CMD ["java", "-jar", "app.jar"]
EOF
docker build . --file Dockerfile --tag yajuhua/podcast2:arm64-$(date +test-%Y-%m-%d) --platform linux/arm64
docker push yajuhua/podcast2:arm64-$(date +test-%Y-%m-%d)
Expand Down Expand Up @@ -195,24 +161,7 @@ jobs:
# 构建 arm32v7 Docker镜像
- name: Build the arm32v7 Docker image
run: |
docker build . --file Dockerfile --tag yajuhua/podcast2:arm32v7-tmp --platform linux/arm/v7
docker run -id --name arm32v7-tmp yajuhua/podcast2:arm32v7-tmp /bin/sh
docker export -o rootfs.tar arm32v7-tmp
cat <<EOF > Dockerfile
FROM scratch
ADD rootfs.tar /
ENV JAVA_HOME=/usr/sbin/jre8
ENV PATH="$JAVA_HOME/bin:$PATH"
ENV LANG=C.UTF-8
ENV TZ=Asia/Shanghai
EXPOSE 8088
WORKDIR /
CMD ["java", "-jar", "app.jar"]
EOF
run: |
docker build . --file Dockerfile --tag yajuhua/podcast2:arm32v7-$(date +test-%Y-%m-%d) --platform linux/arm/v7
docker push yajuhua/podcast2:arm32v7-$(date +test-%Y-%m-%d)
Expand Down

0 comments on commit 1902925

Please sign in to comment.