Skip to content

Commit

Permalink
chore: add docker ci
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Sep 25, 2024
1 parent 6c0c6c3 commit 66b4284
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 10 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/docker_ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Docker-CI

on:
push:
branches:
- "main"
- "release/*"
paths:
- ".github/workflows/docker_ci.yaml"
- "frontend/scripts/docker-buildfiles/**"
- "frontend/rust-lib/**"
- "frontend/appflowy_flutter/**"
- "frontend/resources/**"

pull_request:
branches:
- "main"
- "release/*"
paths:
- ".github/workflows/docker_ci.yaml"
- "frontend/scripts/docker-buildfiles/**"
- "frontend/rust-lib/**"
- "frontend/appflowy_flutter/**"
- "frontend/resources/**"

env:
FLUTTER_VERSION: "3.22.0"
# use 1.80.1 here to avoid cargo-binstall error
RUST_TOOLCHAIN: "1.80.1"

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

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

- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: frontend/scripts/docker-buildfiles
file: frontend/scripts/docker-buildfiles/Dockerfile
push: false
load: true
tags: app:pr-check

# - name: Verify docker-compose
# run: |
# cd frontend/scripts/docker-buildfiles
# docker-compose -f docker-compose.yml config
# docker-compose -f docker-compose.yml up -d
# docker-compose -f docker-compose.yml down

- name: Clean up
if: always()
run: docker image rm app:pr-check
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ jobs:
matrix:
job:
- {
targets: "aarch64-apple-darwin,x86_64-apple-darwin",
os: macos-latest,
extra-build-args: "",
}
targets: "aarch64-apple-darwin,x86_64-apple-darwin",
os: macos-latest,
extra-build-args: "",
}
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down Expand Up @@ -336,12 +336,12 @@ jobs:
matrix:
job:
- {
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-args: "",
flutter_profile: production-linux-x86_64,
}
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-args: "",
flutter_profile: production-linux-x86_64,
}
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down

0 comments on commit 66b4284

Please sign in to comment.