Update Builder
This commit is contained in:
69
.github/workflows/release.yml
vendored
69
.github/workflows/release.yml
vendored
@@ -11,55 +11,60 @@ env:
|
|||||||
IMAGE_NAME: blog
|
IMAGE_NAME: blog
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
Build_x86:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
CPU_ARCH:
|
|
||||||
- arm64
|
|
||||||
- x86_64
|
|
||||||
# If running with act, Uncomment below
|
# If running with act, Uncomment below
|
||||||
container: phaze9/action-runner
|
# container: phaze9/action-runner
|
||||||
|
env:
|
||||||
|
DOCKER_CONFIG: $HOME/.docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Set up Docker Buildx
|
||||||
uses: peaceiris/actions-hugo@v2
|
id: buildx
|
||||||
with:
|
|
||||||
hugo-version: '0.83.1'
|
|
||||||
extended: true
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cd src && hugo --minify --destination build/
|
|
||||||
|
|
||||||
- name: Setup Docker
|
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- name: Login to ghcr.io
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push - x64
|
- name: Login to ghcr.io
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ${{ env.IMAGE_REGISTRY }}
|
||||||
|
username: ${{ env.IMAGE_OWNER }}
|
||||||
|
password: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
id: docker_build_x64
|
id: docker_build_x64
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
if: ${{ matrix.CPU_ARCH == 'x86_64'}}
|
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
|
labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
|
||||||
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:x64-latest
|
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:x64-latest
|
||||||
|
|
||||||
|
Build_ARM64:
|
||||||
|
runs-on: [self-hosted, linux, ARM64]
|
||||||
|
# If running with act, Uncomment below
|
||||||
|
# container: phaze9/action-runner
|
||||||
|
env:
|
||||||
|
DOCKER_CONFIG: $HOME/.docker
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build and push - arm64
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to ghcr.io
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ${{ env.IMAGE_REGISTRY }}
|
||||||
|
username: ${{ env.IMAGE_OWNER }}
|
||||||
|
password: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
id: docker_build_arm64
|
id: docker_build_arm64
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
if: ${{ matrix.CPU_ARCH == 'arm64'}}
|
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
|
labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
|
||||||
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:arm-latest
|
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:arm64-latest
|
||||||
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
blog.fluttershub.com:
|
||||||
|
image: ghcr.io/fluttershub/blog:arm64-latest
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- external
|
||||||
|
container_name: blog.fluttershub.com
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
networks:
|
||||||
|
external:
|
||||||
|
external: true
|
||||||
Reference in New Issue
Block a user