Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use docker github action #47

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ jobs:
run: pnpm install
- name: Run Build
run: pnpm build
build-docker-on-pr:
if: github.event_name == 'pull_request'
needs: build-app
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3

- name: Prepare .env file
run: |
cp .env.production.example .env.production
- name: Run custom Docker build script
run: |
chmod +x ./docker/build.sh
echo "Building Docker image for ${{ github.base_ref }}"
./docker/build.sh ${{ github.base_ref == 'canary' && 'canary' || '' }}

build-and-push-docker-on-push:
if: github.event_name == 'push'
Expand Down
3 changes: 2 additions & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ BUILDER=$(docker buildx create --use)

docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' .

docker buildx rm $BUILDER

docker buildx rm $BUILDER
Loading