mirror of
https://github.com/m1ngsama/FUJI.git
synced 2025-12-24 10:51:27 +00:00
Merge pull request #42 from nbtca/feature-update-action
CI: Update action
This commit is contained in:
commit
9f61b89334
1 changed files with 21 additions and 9 deletions
30
.github/workflows/main.yml
vendored
30
.github/workflows/main.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: build-deploy
|
||||
name: main
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -19,30 +19,42 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 切换分支
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login DockerHub
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
no-cache: true
|
||||
platforms: linux/amd64
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME_FULL }}
|
||||
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and Push to DockerHub
|
||||
uses: docker/build-push-action@v3
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
no-cache: true
|
||||
# target: deploy
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME_FULL }}:${{ github.ref_name }}
|
||||
|
||||
- name: ssh pipelines
|
||||
- name: Deploy
|
||||
uses: appleboy/ssh-action@v1.0.0
|
||||
env:
|
||||
BRANCH_NAME: ${{ github.ref_name }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue