update action

This commit is contained in:
ClasWen 2024-10-17 19:34:36 +08:00
parent 69b075133b
commit d28ac3295a

View file

@ -1,4 +1,4 @@
name: build-deploy name: main
on: on:
push: push:
@ -19,9 +19,19 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# 切换分支 - name: Build container
- name: Checkout uses: docker/build-push-action@v6
uses: actions/checkout@master with:
context: .
file: ./Dockerfile
no-cache: true
platforms: linux/amd64
tags: |
${{ env.IMAGE_NAME_FULL }}:${{ github.ref_name }}
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Login DockerHub - name: Login DockerHub
uses: docker/login-action@v2 uses: docker/login-action@v2
@ -31,12 +41,11 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push to DockerHub - name: Build and Push to DockerHub
uses: docker/build-push-action@v3 uses: docker/build-push-action@v6
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
no-cache: true no-cache: true
# target: deploy
push: true push: true
platforms: linux/amd64 platforms: linux/amd64
tags: | tags: |