Skip to content

Commit

Permalink
Clean up docker build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Era-Dorta committed Jan 4, 2025
1 parent 6903227 commit b62ef33
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Install uv
uses: astral-sh/setup-uv@v5
# release:
# runs-on: ubuntu-latest
# needs: setup
# steps:

- name: Checkout code
uses: actions/checkout@master
with:
Expand All @@ -37,17 +37,21 @@ jobs:
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Release
# env:
# VERSION: ${{ github.event.inputs.version }}
- name: Set env variables
run: |
echo "Start CI build"
uv build
SIGNALBLAST_VERSION=$(uvx hatch version)
DOCKER_TAG="${SIGNALBLAST_VERSION//+/-}"
echo "the version is $SIGNALBLAST_VERSION"
echo "the docker version is $DOCKER_TAG"
- name: Build wheel
run: uv build

- name: Configure docker
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --name multibuilder
docker buildx use multibuilder
docker buildx build --build-arg SIGNALBLAST_VERSION=${SIGNALBLAST_VERSION} --platform linux/amd64,linux/arm64 -t eradorta/signalblast:${DOCKER_TAG} -t eradorta/signalblast:latest .
- name: Build image
run: docker buildx build --build-arg SIGNALBLAST_VERSION=${SIGNALBLAST_VERSION} --platform linux/amd64,linux/arm64 -t eradorta/signalblast:${DOCKER_TAG} -t eradorta/signalblast:latest .

0 comments on commit b62ef33

Please sign in to comment.