Skip to content

Commit

Permalink
Create docker_build_push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CareyWang authored Oct 9, 2023
1 parent 5e82939 commit 64d3437
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Push Multi-Arch Docker Image

on:
push:
branches:
- master

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@master

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/386,linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7
push: true
tags: ${{ secrets.DOCKERHUB_PROJECT }}

0 comments on commit 64d3437

Please sign in to comment.