Skip to content

Commit

Permalink
ci: fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-bouvy committed May 3, 2024
1 parent 7019687 commit f3e41df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ jobs:
node-version: 18
registry-url: 'https://registry.npmjs.org/'

- name: Install dependencies
run: npm install

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
Expand All @@ -44,6 +41,8 @@ jobs:
clickandmortar/mage-wizard:${{ github.sha }}
clickandmortar/mage-wizard:latest
platforms: linux/amd64,linux/arm64
build-args: |
DOCKER_BUILDKIT=1
- name: Clean up Buildx
uses: docker/build-push-action@v2
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ WORKDIR /app

COPY . /app

# npm install is ran in the builder stage, to avoid GitHub actions failure
RUN npm run build
RUN npm install && npm run build


FROM node:18-alpine
Expand Down

0 comments on commit f3e41df

Please sign in to comment.