Add warp runners to support arm64

This commit is contained in:
KMKoushik
2024-08-18 09:17:45 +10:00
parent d609b9ed22
commit c1a99626b6

View File

@@ -14,15 +14,15 @@ on:
jobs: jobs:
build_and_publish_platform_containers: build_and_publish_platform_containers:
name: Build and publish platform containers name: Build and publish platform containers
runs-on: ubuntu-latest runs-on: ${{ matrix.os }}
permissions: permissions:
packages: write packages: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: os:
- linux/amd64 - warp-ubuntu-latest-x64-2x
- linux/arm64 - warp-ubuntu-latest-arm64-2x
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -47,7 +47,7 @@ jobs:
- name: Build the docker image - name: Build the docker image
env: env:
BUILD_PLATFORM: ${{ matrix.platform == 'linux/arm64' && 'arm64' || 'amd64' }} BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-2x' && 'arm64' || 'amd64' }}
run: | run: |
APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')" APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')"
GIT_SHA="$(git rev-parse HEAD)" GIT_SHA="$(git rev-parse HEAD)"
@@ -66,12 +66,12 @@ jobs:
- name: Push the docker image to DockerHub - name: Push the docker image to DockerHub
run: docker push --all-tags "unsend/unsend-$BUILD_PLATFORM" run: docker push --all-tags "unsend/unsend-$BUILD_PLATFORM"
env: env:
BUILD_PLATFORM: ${{ matrix.platform == 'linux/arm64' && 'arm64' || 'amd64' }} BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-2x' && 'arm64' || 'amd64' }}
- name: Push the docker image to GitHub Container Registry - name: Push the docker image to GitHub Container Registry
run: docker push --all-tags "ghcr.io/unsend-dev/unsend-$BUILD_PLATFORM" run: docker push --all-tags "ghcr.io/unsend-dev/unsend-$BUILD_PLATFORM"
env: env:
BUILD_PLATFORM: ${{ matrix.platform == 'linux/arm64' && 'arm64' || 'amd64' }} BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-2x' && 'arm64' || 'amd64' }}
create_and_publish_manifest: create_and_publish_manifest:
name: Create and publish manifest name: Create and publish manifest