Skip to content

Commit

Permalink
chore: add docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Dec 23, 2024
1 parent f88aa22 commit 34a37c7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-docker-image

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build base image
run: bash scripts/build-base-image.sh

- name: Build nginx image
run: bash scripts/build-nginx.sh

- name: Build standalone image
run: bash scripts/build-standalone.sh

- name: Build static image
run: bash scripts/build-static.sh

- name: Push images to Docker Hub
run: bash scripts/push-images.sh

0 comments on commit 34a37c7

Please sign in to comment.