|
|
|
|
@ -12,8 +12,6 @@ jobs:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
outputs:
|
|
|
|
|
version: ${{ steps.version.outputs.version }}
|
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
steps:
|
|
|
|
|
- name: Extract version
|
|
|
|
|
id: version
|
|
|
|
|
@ -24,22 +22,6 @@ jobs:
|
|
|
|
|
echo "version=${GITHUB_REF_NAME#release/}" >> $GITHUB_OUTPUT
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
|
id: meta
|
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
|
with:
|
|
|
|
|
images: |
|
|
|
|
|
neosmemo/memos
|
|
|
|
|
ghcr.io/usememos/memos
|
|
|
|
|
tags: |
|
|
|
|
|
type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
|
|
|
|
|
type=semver,pattern={{major}}.{{minor}},value=${{ steps.version.outputs.version }}
|
|
|
|
|
type=raw,value=stable
|
|
|
|
|
flavor: |
|
|
|
|
|
latest=false
|
|
|
|
|
labels: |
|
|
|
|
|
org.opencontainers.image.version=${{ steps.version.outputs.version }}
|
|
|
|
|
|
|
|
|
|
build-frontend:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
@ -124,7 +106,6 @@ jobs:
|
|
|
|
|
context: .
|
|
|
|
|
file: ./scripts/Dockerfile
|
|
|
|
|
platforms: ${{ matrix.platform }}
|
|
|
|
|
labels: ${{ needs.prepare.outputs.labels }}
|
|
|
|
|
cache-from: type=gha,scope=build-${{ matrix.platform }}
|
|
|
|
|
cache-to: type=gha,mode=max,scope=build-${{ matrix.platform }}
|
|
|
|
|
outputs: type=image,name=neosmemo/memos,push-by-digest=true,name-canonical=true,push=true
|
|
|
|
|
@ -160,6 +141,22 @@ jobs:
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
|
id: meta
|
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
|
with:
|
|
|
|
|
images: |
|
|
|
|
|
neosmemo/memos
|
|
|
|
|
ghcr.io/usememos/memos
|
|
|
|
|
tags: |
|
|
|
|
|
type=semver,pattern={{version}},value=${{ needs.prepare.outputs.version }}
|
|
|
|
|
type=semver,pattern={{major}}.{{minor}},value=${{ needs.prepare.outputs.version }}
|
|
|
|
|
type=raw,value=stable
|
|
|
|
|
flavor: |
|
|
|
|
|
latest=false
|
|
|
|
|
labels: |
|
|
|
|
|
org.opencontainers.image.version=${{ needs.prepare.outputs.version }}
|
|
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
|
with:
|
|
|
|
|
@ -173,23 +170,13 @@ jobs:
|
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
|
password: ${{ github.token }}
|
|
|
|
|
|
|
|
|
|
- name: Create manifest list and push (Docker Hub)
|
|
|
|
|
working-directory: /tmp/digests
|
|
|
|
|
run: |
|
|
|
|
|
docker buildx imagetools create \
|
|
|
|
|
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
|
|
|
$(printf 'neosmemo/memos@sha256:%s ' *)
|
|
|
|
|
env:
|
|
|
|
|
DOCKER_METADATA_OUTPUT_JSON: ${{ needs.prepare.outputs.tags }}
|
|
|
|
|
|
|
|
|
|
- name: Create manifest list and push (GHCR)
|
|
|
|
|
- name: Create manifest list and push
|
|
|
|
|
working-directory: /tmp/digests
|
|
|
|
|
run: |
|
|
|
|
|
docker buildx imagetools create \
|
|
|
|
|
$(jq -cr '.tags | map(sub("neosmemo/memos"; "ghcr.io/usememos/memos") | "-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
|
|
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
|
|
|
$(printf 'neosmemo/memos@sha256:%s ' *)
|
|
|
|
|
env:
|
|
|
|
|
DOCKER_METADATA_OUTPUT_JSON: ${{ needs.prepare.outputs.tags }}
|
|
|
|
|
DOCKER_METADATA_OUTPUT_JSON: ${{ steps.meta.outputs.json }}
|
|
|
|
|
|
|
|
|
|
- name: Inspect images
|
|
|
|
|
run: |
|
|
|
|
|
|