Skip to content

Commit

Permalink
fix: Update Docker Build workflow to improve code checkout and build …
Browse files Browse the repository at this point in the history
…process
  • Loading branch information
MountainGod2 committed Nov 6, 2024
1 parent 3657ad6 commit 3e37e9b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
platform: [linux/amd64, linux/arm64]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -42,7 +45,14 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
driver-opts: network=host
driver: docker-container

- name: Create and Use Builder
run: |
docker buildx create --use --name mybuilder
docker buildx inspect mybuilder --bootstrap
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -63,7 +73,7 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.platform }}
platforms: linux/amd64,linux/arm64
annotations: ${{ steps.meta.outputs.annotations }}

- name: Clean up Buildx
Expand Down

0 comments on commit 3e37e9b

Please sign in to comment.