Update publish.yml
This commit is contained in:
19
.github/workflows/publish.yml
vendored
19
.github/workflows/publish.yml
vendored
@@ -14,19 +14,22 @@ 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: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
platform:
|
||||||
- warp-ubuntu-latest-x64-4x
|
- linux/amd64
|
||||||
- warp-ubuntu-latest-arm64-4x
|
- linux/arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -42,7 +45,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build the docker image
|
- name: Build the docker image
|
||||||
env:
|
env:
|
||||||
BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
|
BUILD_PLATFORM: ${{ matrix.platform == 'linux/arm64' && '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)"
|
||||||
@@ -61,12 +64,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.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
|
BUILD_PLATFORM: ${{ matrix.platform == 'linux/arm64' && '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/unsend-$BUILD_PLATFORM"
|
run: docker push --all-tags "ghcr.io/unsend/unsend-$BUILD_PLATFORM"
|
||||||
env:
|
env:
|
||||||
BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
|
BUILD_PLATFORM: ${{ matrix.platform == 'linux/arm64' && 'arm64' || 'amd64' }}
|
||||||
|
|
||||||
create_and_publish_manifest:
|
create_and_publish_manifest:
|
||||||
name: Create and publish manifest
|
name: Create and publish manifest
|
||||||
@@ -89,7 +92,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GH_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Create and push DockerHub manifest
|
- name: Create and push DockerHub manifest
|
||||||
run: |
|
run: |
|
||||||
|
Reference in New Issue
Block a user