mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-26 01:10:30 -04:00
ci: add manual ARM64 branch image workflow
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
name: Build Coolify ARM64 Branch Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
image_tag: ${{ steps.image.outputs.image_tag }}
|
||||
version: ${{ steps.image.outputs.version }}
|
||||
steps:
|
||||
- name: Resolve image tag
|
||||
id: image
|
||||
env:
|
||||
BRANCH_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
IMAGE_TAG=$(echo "${BRANCH_NAME}" | tr '[:upper:]/_' '[:lower:]--' | sed -E 's/[^a-z0-9.-]+/-/g; s/^[.-]+//; s/[.-]+$//')
|
||||
if [ -z "${IMAGE_TAG}" ]; then
|
||||
echo "Could not create an image tag from branch: ${BRANCH_NAME}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SHORT_SHA="${GITHUB_SHA::7}"
|
||||
echo "image_tag=${IMAGE_TAG}" >> "${GITHUB_OUTPUT}"
|
||||
echo "version=${IMAGE_TAG}.${SHORT_SHA}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
build:
|
||||
needs: prepare
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push ARM64 image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: docker/production/Dockerfile
|
||||
platforms: linux/arm64
|
||||
push: true
|
||||
build-args: |
|
||||
COOLIFY_VERSION=${{ needs.prepare.outputs.version }}
|
||||
tags: ghcr.io/coollabsio/coolify:${{ needs.prepare.outputs.image_tag }}
|
||||
Reference in New Issue
Block a user