|
|
|
|
@ -16,7 +16,7 @@ env:
|
|
|
|
|
DOCKERHUB_REGISTRY: docker.io
|
|
|
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
|
TEST_TAG: triliumnext/notes:test
|
|
|
|
|
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
|
|
|
|
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
test_docker:
|
|
|
|
|
@ -73,21 +73,29 @@ jobs:
|
|
|
|
|
packages: write
|
|
|
|
|
attestations: write
|
|
|
|
|
id-token: write
|
|
|
|
|
strategy:
|
|
|
|
|
matrix:
|
|
|
|
|
architecture: [linux/amd64, linux/arm64, linux/arm/v7, linux/arm64/v8]
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
|
- name: Extract metadata (tags, labels) for GHCR image
|
|
|
|
|
id: ghcr-meta
|
|
|
|
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
|
with:
|
|
|
|
|
images: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
|
|
|
tags:
|
|
|
|
|
tags: |
|
|
|
|
|
type=ref,event=branch
|
|
|
|
|
type=ref,event=tag
|
|
|
|
|
type=sha
|
|
|
|
|
- name: Extract metadata (tags, labels) for DockerHub image
|
|
|
|
|
id: dh-meta
|
|
|
|
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
|
with:
|
|
|
|
|
images: ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
|
|
|
tags: |
|
|
|
|
|
type=ref,event=branch
|
|
|
|
|
type=ref,event=tag
|
|
|
|
|
type=sha
|
|
|
|
|
- name: Set up node & dependencies
|
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
|
with:
|
|
|
|
|
@ -99,7 +107,7 @@ jobs:
|
|
|
|
|
- name: Create server-package.json
|
|
|
|
|
run: cat package.json | grep -v electron > server-package.json
|
|
|
|
|
- name: Log in to the GHCR container registry
|
|
|
|
|
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
|
with:
|
|
|
|
|
registry: ${{ env.GHCR_REGISTRY }}
|
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
|
@ -110,7 +118,7 @@ jobs:
|
|
|
|
|
id: ghcr-push
|
|
|
|
|
with:
|
|
|
|
|
context: .
|
|
|
|
|
platforms: ${{ env.PLATFORMS }}
|
|
|
|
|
platforms: ${{ matrix.architecture }}
|
|
|
|
|
push: true
|
|
|
|
|
tags: ${{ steps.ghcr-meta.outputs.tags }}
|
|
|
|
|
labels: ${{ steps.ghcr-meta.outputs.labels }}
|
|
|
|
|
@ -123,7 +131,7 @@ jobs:
|
|
|
|
|
subject-digest: ${{ steps.ghcr-push.outputs.digest }}
|
|
|
|
|
push-to-registry: true
|
|
|
|
|
- name: Log in to the DockerHub container registry
|
|
|
|
|
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
|
with:
|
|
|
|
|
registry: ${{ env.DOCKERHUB_REGISTRY }}
|
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
|
@ -133,7 +141,7 @@ jobs:
|
|
|
|
|
id: dh-push
|
|
|
|
|
with:
|
|
|
|
|
context: .
|
|
|
|
|
platforms: ${{ env.PLATFORMS }}
|
|
|
|
|
platforms: ${{ matrix.architecture }}
|
|
|
|
|
push: true
|
|
|
|
|
tags: ${{ steps.dh-meta.outputs.tags }}
|
|
|
|
|
labels: ${{ steps.dh-meta.outputs.labels }}
|
|
|
|
|
@ -145,4 +153,3 @@ jobs:
|
|
|
|
|
subject-name: ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME}}
|
|
|
|
|
subject-digest: ${{ steps.dh-push.outputs.digest }}
|
|
|
|
|
push-to-registry: true
|
|
|
|
|
|