Update builder
This commit is contained in:
72
.github/workflows/release.yml
vendored
72
.github/workflows/release.yml
vendored
@@ -12,14 +12,45 @@ env:
|
||||
IMAGE_NAME: blog
|
||||
|
||||
jobs:
|
||||
# Build_x86:
|
||||
# runs-on: ubuntu-latest
|
||||
Build_Image:
|
||||
runs-on: ubuntu-latest
|
||||
# If running with act, Uncomment below
|
||||
# container: phaze9/action-runner
|
||||
env:
|
||||
DOCKER_CONFIG: $HOME/.docker
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ${{ env.IMAGE_REGISTRY }}
|
||||
username: ${{ env.IMAGE_OWNER }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push multi-arch image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
labels: org.opencontainers.image.source=https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
|
||||
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}: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
|
||||
# - uses: actions/checkout@v3
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: buildx
|
||||
@@ -33,39 +64,10 @@ jobs:
|
||||
# password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# - name: Build and push
|
||||
# id: docker_build_x64
|
||||
# id: docker_build_arm64
|
||||
# uses: docker/build-push-action@v2
|
||||
# with:
|
||||
# push: true
|
||||
# platforms: linux/amd64
|
||||
# platforms: linux/arm64
|
||||
# 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
|
||||
|
||||
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@v3
|
||||
|
||||
- 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.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build_arm64
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/arm64
|
||||
labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
|
||||
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:arm64-latest
|
||||
# tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:arm64-latest
|
||||
Reference in New Issue
Block a user