Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenliang123 committed Dec 16, 2024
1 parent 7f095bd commit 868efd7
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:

jobs:
test:
if: false
name: API Tests
runs-on: ubuntu-latest
strategy:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build API docker image

on:
pull_request:
branches:
- "main"
paths:
- api/Dockerfile
- web/Dockerfile

concurrency:
group: docker-build-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build-docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- service_name: "api-amd64"
platform: linux/amd64
context: "api"
- service_name: "api-arm64"
platform: linux/arm64
context: "api"
- service_name: "web-amd64"
platform: linux/amd64
context: "web"
- service_name: "web-arm64"
platform: linux/arm64
context: "web"
steps:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3

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

- name: Build Docker Image
uses: docker/build-push-action@v6
with:
push: false
context: "{{defaultContext}}:${{ matrix.context }}"
platforms: ${{ matrix.platform }}
cache-from: type=gha
cache-to: type=gha,mode=max
3 changes: 3 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ concurrency:

jobs:
python-style:
if: false
name: Python Style
runs-on: ubuntu-latest

Expand Down Expand Up @@ -52,6 +53,7 @@ jobs:
web-style:
name: Web Style
runs-on: ubuntu-latest
if: false
defaults:
run:
working-directory: ./web
Expand Down Expand Up @@ -84,6 +86,7 @@ jobs:


superlinter:
if: false
name: SuperLinter
runs-on: ubuntu-latest

Expand Down
1 change: 0 additions & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ COPY . /app/api/
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh


ARG COMMIT_SHA
ENV COMMIT_SHA=${COMMIT_SHA}

Expand Down
1 change: 0 additions & 1 deletion web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ RUN yarn global add pm2 \
&& chown -R 1001:0 /.pm2 /app/web \
&& chmod -R g=u /.pm2 /app/web


ARG COMMIT_SHA
ENV COMMIT_SHA=${COMMIT_SHA}

Expand Down

0 comments on commit 868efd7

Please sign in to comment.