Skip to content

Commit

Permalink
🔥 根据不同分支分别构建
Browse files Browse the repository at this point in the history
  • Loading branch information
wiseCirno committed Dec 3, 2024
1 parent f153c97 commit 5a22ba3
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,21 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Build and push for master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -32,21 +37,8 @@ jobs:
push: true
tags: darinirvana/neko-chan:latest

dev:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
- name: Build and push for dev
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@v4
with:
context: .
Expand Down

0 comments on commit 5a22ba3

Please sign in to comment.