From 733d398db1f2b97f45022342f53c6735f0faa80a Mon Sep 17 00:00:00 2001 From: tchapacan Date: Mon, 1 Apr 2024 19:58:02 +0200 Subject: [PATCH] multiple little fix & update publish workflow & comment failing arch --- .github/workflows/code-checks.yml | 4 ++-- .github/workflows/publish.yml | 18 ++++++++---------- Dockerfile | 4 ---- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 178c15c..be94b57 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -18,8 +18,8 @@ jobs: toolchain: [stable] arch: - {os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu", cross: false} - - {os: "ubuntu-latest", target: "armv7-unknown-linux-gnueabihf", cross: true} - - {os: "ubuntu-latest", target: "aarch64-unknown-linux-gnu", cross: true} +# - {os: "ubuntu-latest", target: "armv7-unknown-linux-gnueabihf", cross: true} +# - {os: "ubuntu-latest", target: "aarch64-unknown-linux-gnu", cross: true} steps: - name: "Checkout repo 👉" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5a3c7a6..5b5ac24 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,9 +2,8 @@ name: "Release docker image" run-name: "Release docker image: ${{ github.event.release.name }} ⛑️" on: - push: -# release: -# types: [published] + release: + types: [published] jobs: docker: @@ -37,12 +36,11 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" -# - name: Login to DockerHub -# uses: docker/login-action@v2 -# if: github.event_name != 'pull_request' -# with: -# username: ${{ secrets.DOCKERHUB_USERNAME }} -# password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v4 @@ -52,6 +50,6 @@ jobs: context: . file: ./Dockerfile platforms: linux/amd64,linux/arm64 - push: false + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 3e3d944..3edea77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,8 @@ FROM --platform=$BUILDPLATFORM rust:bookworm as vendor ARG BUILDPLATFORM ARG TARGETPLATFORM -RUN echo "Running on: $BUILDPLATFORM / Building for $TARGETPLATFORM" WORKDIR /app - COPY ./Cargo.toml . -#COPY ./Cargo.lock . COPY ./src src RUN mkdir .cargo && cargo vendor > .cargo/config.toml @@ -15,7 +12,6 @@ WORKDIR /app COPY --from=vendor /app/.cargo .cargo COPY --from=vendor /app/vendor vendor COPY ./Cargo.toml . -#COPY ./Cargo.lock . COPY ./src src RUN cargo build --release