Skip to content

Commit

Permalink
Reduce platforms, add version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Sep 22, 2023
1 parent 389fd5d commit 5c7ca3f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/_release_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ on:
required: true
type: string
description: "Path to the Dockerfile to build"
image-name:
image:
required: true
type: string
description: "Name of the image to build"

env:
TEST_TAG: ${{ inputs.image-name }}:test
LATEST_TAG: ${{ inputs.image-name }}:latest
TEST_TAG: ${{ inputs.image }}:test
LATEST_TAG: ${{ inputs.image }}:latest

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set VERSION
run: echo "VERSION=$( git tag -l 'v*' --sort -v:refname --merged | head -n 1 )" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -46,7 +48,9 @@ jobs:
with:
context: .
file: ${{ inputs.dockerfile }}
# Building for the intersection of platforms supported by QEMU and base python image
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
# We can only build for the intersection of platforms supported by
# QEMU and base python image, for now build only for
# linux/amd64 and linux/arm64
platforms: linux/amd64,linux/arm64
# push: true
tags: ${{ env.LATEST_TAG }}
tags: ${{ env.LATEST_TAG }},${{ inputs.image }}:${{ env.VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/langchain_release_docker_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
uses: ./.github/workflows/_release_docker.yml
with:
dockerfile: docker/Dockerfile.base
image-name: langchain/base
image: langchain/base
secrets: inherit

0 comments on commit 5c7ca3f

Please sign in to comment.