From b74667bcfa1a401d43d39b18547148e0cd2a622f Mon Sep 17 00:00:00 2001 From: Alexandr Bogomiakov Date: Thu, 24 Jul 2025 01:18:17 +0300 Subject: [PATCH] Fix Release action --- .github/workflows/main.yml | 90 +++++++++++++++++++------------------- Dockerfile | 10 ++++- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e3d60f..10e63cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -146,49 +146,49 @@ jobs: generate_release_notes: true fail_on_unmatched_files: false - # build_docker: - # name: Build and Publish Docker Image - # needs: build - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - # - uses: actions/download-artifact@v4 - # name: Download Linux MUSL artifact - # with: - # name: ${{ env.BINARY_NAME }}_linux-amd64-musl - # path: . - # - # - name: ls - # run: | - # ls -lah - # - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - # - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - # - # - name: Login to Docker Hub - # uses: docker/login-action@v3 - # with: - # username: ultradesu - # password: ${{ secrets.DOCKERHUB_TOKEN }} - # - # - name: Set exec flag - # run: | - # chmod +x ${{ env.BINARY_NAME }} - # - # - name: Set outputs - # id: get_tag - # run: | - # echo "tag=$(echo ${GITHUB_REF} | cut -d'/' -f3)" >> $GITHUB_OUTPUT - # - # - name: Build and push Docker image - # uses: docker/build-push-action@v5 - # with: - # context: . - # platforms: linux/amd64,linux/arm64 - # push: true - # tags: ultradesu/${{ env.BINARY_NAME }}:latest,ultradesu/${{ env.BINARY_NAME }}:${{ steps.get_tag.outputs.tag }} + build_docker: + name: Build and Publish Docker Image + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + name: Download Linux artifact + with: + name: ${{ env.BINARY_NAME }}_linux-amd64 + path: . + + - name: List downloaded files + run: | + ls -lah + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ultradesu + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set exec flag + run: | + chmod +x ${{ env.BINARY_NAME }} + + - name: Set outputs + id: get_tag + run: | + echo "tag=$(echo ${GITHUB_REF} | cut -d'/' -f3)" >> $GITHUB_OUTPUT + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ultradesu/${{ env.BINARY_NAME }}:latest,ultradesu/${{ env.BINARY_NAME }}:${{ steps.get_tag.outputs.tag }} diff --git a/Dockerfile b/Dockerfile index 3db4105..cb5a08d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,13 @@ # syntax=docker/dockerfile:1 -FROM alpine:latest +FROM ubuntu:22.04 + +# Install basic runtime dependencies +RUN apt-get update && apt-get install -y \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + COPY khm /usr/local/bin/khm +RUN chmod +x /usr/local/bin/khm + ENTRYPOINT ["/usr/local/bin/khm"]