1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 17:59:31 +02:00
This commit is contained in:
badlop 2025-10-01 01:05:19 +02:00 committed by GitHub
commit 0f51075ebc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,9 +15,15 @@ env:
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}
jobs: jobs:
container:
build-amd64:
name: Container name: Container
runs-on: ubuntu-22.04 runs-on: ubuntu-24.04${{ matrix.runner-suffix }}
strategy:
matrix:
include:
- platform: amd64
runner-suffix:
permissions: permissions:
packages: write packages: write
steps: steps:
@ -48,14 +54,12 @@ jobs:
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: suffix=--${{ matrix.platform }},latest=false
labels: | labels: |
org.opencontainers.image.revision=${{ steps.gitdescribe.outputs.ver }} org.opencontainers.image.revision=${{ steps.gitdescribe.outputs.ver }}
org.opencontainers.image.licenses=GPL-2.0 org.opencontainers.image.licenses=GPL-2.0
org.opencontainers.image.vendor=ProcessOne org.opencontainers.image.vendor=ProcessOne
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -69,6 +73,101 @@ jobs:
context: . context: .
file: .github/container/Dockerfile file: .github/container/Dockerfile
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64 platforms: linux/${{ matrix.platform }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
build-arm64:
name: Container
runs-on: ubuntu-24.04${{ matrix.runner-suffix }}
strategy:
matrix:
include:
- platform: arm64
runner-suffix: -arm
permissions:
packages: write
steps:
- name: Check out repository code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Checkout ejabberd-contrib
uses: actions/checkout@v5
with:
repository: processone/ejabberd-contrib
path: .ejabberd-modules/sources/ejabberd-contrib
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get git describe
id: gitdescribe
run: echo "ver=$(git describe --tags)" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: suffix=--${{ matrix.platform }},latest=false
labels: |
org.opencontainers.image.revision=${{ steps.gitdescribe.outputs.ver }}
org.opencontainers.image.licenses=GPL-2.0
org.opencontainers.image.vendor=ProcessOne
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
build-args: |
VERSION=${{ steps.gitdescribe.outputs.ver }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: .github/container/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/${{ matrix.platform }}
push: true
tags: ${{ steps.meta.outputs.tags }}
merge:
needs:
- build-amd64
- build-arm64
runs-on: ubuntu-24.04
outputs:
image-uri: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.merge.outputs.digest }}
steps:
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: metadata
with:
images: ghcr.io/${{ github.repository }}
- uses: int128/docker-manifest-create-action@v2
id: merge
with:
index-annotations: ${{ steps.metadata.outputs.labels }}
tags: ${{ steps.metadata.outputs.tags }}
sources: |
${{ steps.metadata.outputs.tags }}--amd64
${{ steps.metadata.outputs.tags }}--arm64
- uses: dataaxiom/ghcr-cleanup-action@v1
with:
dry-run: true
delete-tags: '*--a??64'
delete-untagged: true
delete-ghost-images: true
delete-partial-images: true
delete-orphaned-images: true