Skip to content

Commit

Permalink
multiple little fix & update publish workflow & comment failing arch
Browse files Browse the repository at this point in the history
  • Loading branch information
tchapacan authored and drkaine committed Apr 3, 2024
1 parent 7399688 commit 733d398
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 👉"
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand Down

0 comments on commit 733d398

Please sign in to comment.