Skip to content

Commit

Permalink
Split the build into two steps
Browse files Browse the repository at this point in the history
  • Loading branch information
onel committed Mar 22, 2024
1 parent fe77388 commit 338cac5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
15 changes: 15 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.git
.github
.gitignore

# TODO: we need custom build for web to make this work. can't use docker compose
# DOCKER_BUILDKIT=1
# docker build -f ./web/Dockerfile.dev ./web/ -t peermetrics/web:dev
# node_modules/
__pycache__/

.gcloudignore

Dockerfile.dev

Dockerfile.dev.dockerignore
35 changes: 18 additions & 17 deletions .github/workflows/docker-hub-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,35 @@ on:
- 'master'

jobs:
docker:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
- name: Checkout repository
uses: actions/checkout@v4

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

-
name: Use Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'

- name: ls dir
run: ls -al static/js/app-dashboard

-
name: Install dependencies
- name: Install dependencies
run: npm install

-
name: npm Build
- name: Run npm build
run: npm run build

docker:
runs-on: ubuntu-latest
needs: build
steps:
-
name: Checkout repository
uses: actions/checkout@v4

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

-
name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -54,4 +55,4 @@ jobs:
push: true

- name: Logout from Docker Hub
run: docker logout
run: docker logout

0 comments on commit 338cac5

Please sign in to comment.