mirror of
https://github.com/neodyland/sbv2-api.git
synced 2026-01-07 06:52:57 +00:00
Compare commits
3 Commits
v0.2.0-rc.
...
v0.2.0-rc.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2430fc794 | ||
|
|
2bfca72f41 | ||
|
|
95b84ca55b |
53
.github/workflows/CI.yml
vendored
53
.github/workflows/CI.yml
vendored
@@ -18,6 +18,7 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
id-token: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GHCR_REPO: ghcr.io/tuna2134/sbv2-api
|
GHCR_REPO: ghcr.io/tuna2134/sbv2-api
|
||||||
@@ -138,10 +139,11 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
machine:
|
machine:
|
||||||
- platform: linux/amd64
|
- platform: amd64
|
||||||
runner: ubuntu-latest
|
runner: ubuntu-latest
|
||||||
- platform: linux/arm64
|
- platform: arm64
|
||||||
runner: ubuntu-24.04-arm64
|
runner: ubuntu-24.04-arm64
|
||||||
|
tag: [cpu, cuda]
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
@@ -172,23 +174,11 @@ jobs:
|
|||||||
id: build
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platform }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
outputs: type=image,"name=${{ env.GHCR_REPO }}",push-by-digest=true,name-canonical=true,push=true
|
file: docker/${{ matrix.tag }}.Dockerfile
|
||||||
|
push: true
|
||||||
- name: Export digest
|
tags: |
|
||||||
run: |
|
${{ env.GHCR_REPO }}:latest-${{ matrix.tag }}-${{ matrix.machine.platform }}
|
||||||
mkdir -p ${{ runner.temp }}/digests
|
|
||||||
digest="${{ steps.build.outputs.digest }}"
|
|
||||||
touch "${{ runner.temp }}/digests/${digest#sha256:}"
|
|
||||||
|
|
||||||
- name: Upload digest
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: digests-${{ env.PLATFORM_PAIR }}
|
|
||||||
path: ${{ runner.temp }}/digests/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
merge:
|
merge:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -212,24 +202,11 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Merge
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.GHCR_REPO }}
|
|
||||||
tags: |
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
|
|
||||||
- name: Create manifest list and push
|
|
||||||
working-directory: ${{ runner.temp }}/digests
|
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
docker buildx imagetools create -t ${{ env.GHCR_REPO }}:cuda \
|
||||||
$(printf '${{ env.GHCR_REPO }}@sha256:%s ' *)
|
${{ env.GHCR_REPO }}:latest-cuda-amd64 \
|
||||||
|
${{ env.GHCR_REPO }}:latest-cuda-arm64
|
||||||
- name: Inspect image
|
docker buildx imagetools create -t ${{ env.GHCR_REPO }}:cpu \
|
||||||
run: |
|
${{ env.GHCR_REPO }}:latest-cpu-amd64 \
|
||||||
docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}
|
${{ env.GHCR_REPO }}:latest-cpu-arm64
|
||||||
|
|||||||
Reference in New Issue
Block a user