Skip to content

Commit

Permalink
ci(docker-build): fix backend and add build args
Browse files Browse the repository at this point in the history
  • Loading branch information
feightwywx committed Dec 8, 2024
1 parent cb0a42e commit 5329bcd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Frontend - Docker meta
id: frontend_meta
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -65,13 +68,21 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.frontend_meta.outputs.tags }}
labels: ${{ steps.frontend_meta.outputs.labels }}
build-args:
- ATB_VERSION=${{ steps.frontend_meta.outputs.version }}
- ATB_VERSION_COMMIT=${{ steps.vars.outputs.sha_short }}
- ATB_TARGET=web

- name: Backend - Build and push
uses: docker/build-push-action@v6
with:
context: ./backend/app
context: ./backend
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.frontend_meta.outputs.tags }}
labels: ${{ steps.frontend_meta.outputs.labels }}
build-args:
- ATB_VERSION=${{ steps.frontend_meta.outputs.version }}
- ATB_VERSION_COMMIT=${{ steps.vars.outputs.sha_short }}
- ATB_TARGET=web

0 comments on commit 5329bcd

Please sign in to comment.