Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
takatost committed Jun 21, 2024
1 parent 3e01b13 commit 5baa2a2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/api-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
DIFY_API_IMAGE_NAME: ${{ vars.DIFY_API_IMAGE_NAME || 'langgenius/dify-api' }}

jobs:
api-docker:
build:
runs-on: ${{ matrix.platform == 'linux/arm64' && 'arm64_runner' || 'ubuntu-latest' }}
if: github.repository == 'langgenius/dify'
strategy:
Expand All @@ -30,9 +30,6 @@ jobs:
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4

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

Expand All @@ -45,13 +42,11 @@ jobs:
username: ${{ env.DOCKERHUB_USER }}
password: ${{ env.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DIFY_API_IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=poetry-,suffix=-${{ matrix.platform }},format=long

- name: Build Docker image
id: build
Expand Down Expand Up @@ -80,7 +75,7 @@ jobs:
retention-days: 1

create-manifest:
needs: api-docker
needs: build
runs-on: ubuntu-latest
steps:
- name: Download digests
Expand All @@ -102,7 +97,10 @@ jobs:
with:
images: ${{ env.DIFY_API_IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=ref,event=branch
type=sha,enable=true,priority=100,prefix=poetry-,suffix=,format=long
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Create manifest list and push
working-directory: /tmp/digests
Expand Down

0 comments on commit 5baa2a2

Please sign in to comment.