refactor CI workflow to unify build job name and support multi-platform Docker images; update image URL in docker-compose
This commit is contained in:
parent
ccdf9dddc3
commit
1c9c77eca3
@ -5,7 +5,7 @@ on:
|
|||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_amd64:
|
build:
|
||||||
name: Build and Push Docker Image (amd64)
|
name: Build and Push Docker Image (amd64)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ jobs:
|
|||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: git.ivanch.me/ivanch/new-home/home-page:latest
|
tags: git.ivanch.me/ivanch/new-home/home-page:latest
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64, linux/arm64
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
@ -47,7 +47,7 @@ jobs:
|
|||||||
deploy local (demo):
|
deploy local (demo):
|
||||||
name: Update running container
|
name: Update running container
|
||||||
runs-on: self-hosted-ubuntu-latest
|
runs-on: self-hosted-ubuntu-latest
|
||||||
needs: build_amd64
|
needs: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Recreate container
|
- name: Recreate container
|
||||||
@ -67,7 +67,7 @@ jobs:
|
|||||||
deploy live:
|
deploy live:
|
||||||
name: Update running container
|
name: Update running container
|
||||||
runs-on: self-hosted-ubuntu-latest
|
runs-on: self-hosted-ubuntu-latest
|
||||||
needs: build_amd64
|
needs: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Recreate container
|
- name: Recreate container
|
||||||
|
@ -2,7 +2,7 @@ version: '3.8'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
home-page:
|
home-page:
|
||||||
image: https://git.ivanch.me/ivanch/new-home/home-page:latest
|
image: git.ivanch.me/ivanch/new-home/home-page:latest
|
||||||
ports:
|
ports:
|
||||||
- 6800:80
|
- 6800:80
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
Loading…
x
Reference in New Issue
Block a user