Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust buildx to fix Docker build failed #2120

Merged
merged 4 commits into from
Sep 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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