Build using Gitea runners
This commit is contained in:
48
.github/workflows/docker-publish.yml
vendored
48
.github/workflows/docker-publish.yml
vendored
@@ -8,27 +8,53 @@ on:
|
|||||||
- '**/README.md'
|
- '**/README.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-build-and-publish:
|
build:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- {arch: 'arm64'}
|
||||||
|
- {arch: 'amd64'}
|
||||||
|
runs-on: ${{ matrix.config.arch == 'arm64' && 'ubuntu-arm64' || 'ubuntu-amd64' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Build and Push Docker images for all Container Registries
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
|
tags: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-${{matrix.config.arch}}, ${{ vars.DOCKERHUB_REPO }}:latest-${{matrix.config.arch}}
|
||||||
|
file: Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ vars.DOCKERHUB_REPO }}:2.10.0 , ${{ vars.DOCKERHUB_REPO }}:latest
|
|
||||||
|
merge-docker-manifest:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create and push manifest images for pinned
|
||||||
|
uses: Noelware/docker-manifest-action@v1
|
||||||
|
with:
|
||||||
|
inputs: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-arm64,${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-amd64
|
||||||
|
tags: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}
|
||||||
|
push: true
|
||||||
|
|
||||||
|
- name: Create and push manifest images for latest
|
||||||
|
uses: Noelware/docker-manifest-action@v1
|
||||||
|
with:
|
||||||
|
inputs: ${{ vars.DOCKERHUB_REPO }}:latest-arm64,${{ vars.DOCKERHUB_REPO }}:latest-amd64
|
||||||
|
tags: ${{ vars.DOCKERHUB_REPO }}:latest
|
||||||
|
push: true
|
||||||
|
Reference in New Issue
Block a user