Skip to content

Commit

Permalink
fix: docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
loks0n committed Feb 28, 2024
1 parent 8eb9199 commit cdeb0b0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,37 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Fetch submodules
submodules: recursive
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
env:
_BUILD_WEBSITE_URL: https://appwrite.io
_BUILD_WEBSITE_VERSION: 1.5.x
_BUILD_GIT_URL: https://github.com/appwrite/website.git
_BUILD_GIT_BRANCH: main
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: appwrite/assistant
tags: type=semver,pattern={{major}}.{{minor}}.{{patch}}

- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
_BUILD_WEBSITE_URL=https://appwrite.io
_BUILD_WEBSITE_VERSION=1.5.x
_BUILD_GIT_URL=https://github.com/appwrite/website.git
_BUILD_GIT_BRANCH=main
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ RUN pnpm --prod install

COPY . .

ARG _BUILD_GIT_URL
ARG _BUILD_GIT_BRANCH
ARG _BUILD_WEBSITE_URL
ARG _BUILD_WEBSITE_VERSION

ENV _BUILD_GIT_URL=${_BUILD_GIT_URL}
ENV _BUILD_GIT_BRANCH=${_BUILD_GIT_BRANCH}
ENV _BUILD_WEBSITE_URL=${_BUILD_WEBSITE_URL}
ENV _BUILD_WEBSITE_VERSION=${_BUILD_WEBSITE_VERSION}

RUN pnpm run fetch-sources

ENV _APP_ASSISTANT_OPENAI_API_KEY=''
Expand Down

0 comments on commit cdeb0b0

Please sign in to comment.