Skip to content

Commit

Permalink
fix: adjust buildx to fix Docker build failed (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsliu2017 committed Sep 8, 2021
1 parent 98fe38a commit 79012fd
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/deploy-with-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ jobs:
${{ runner.os }}-buildx-apisixdashboard-
${{ runner.os }}-buildx-
- uses: Azure/docker-login@v1
if: ${{ github.event_name == 'push' }}
with:
login-server: apisixacr.azurecr.cn
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build Docker Image
uses: docker/build-push-action@v2
with:
Expand All @@ -50,6 +43,10 @@ jobs:
context: .
build-args: |
APISIX_DASHBOARD_VERSION=master
cache-from: |
type=local,src=/tmp/.buildx-cache
cache-to: |
type=local,dest=/tmp/.buildx-cache
- name: Modify Config
run: |
Expand All @@ -65,7 +62,9 @@ jobs:
continue-on-error: true
run: |
docker buildx bake --load \
-f docker-compose.yaml
-f docker-compose.yaml \
--set *.cache-from=type=local,src=/tmp/.buildx-cache \
--set *.cache-to=type=local,dest=/tmp/.buildx-cache
- name: Run Docker Compose
working-directory: ./api/test/docker-deploy
Expand All @@ -77,6 +76,13 @@ jobs:
- name: Run Test
run: api/test/shell/manager_smoking.sh -s false

- uses: Azure/docker-login@v1
if: ${{ github.event_name == 'push' }}
with:
login-server: apisixacr.azurecr.cn
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Deploy
if: ${{ github.event_name == 'push' }}
run: |
Expand Down

0 comments on commit 79012fd

Please sign in to comment.