Compare commits

...

11 Commits

Author SHA1 Message Date
Tom Moor 0cc91e9bc1 v0.82.1-5 2025-02-22 12:42:56 -05:00
Tom Moor d05b088a3e Use digests instead of tags 2025-02-22 12:42:52 -05:00
Tom Moor c221622a00 v0.82.1-4 2025-02-22 12:34:29 -05:00
Tom Moor 1f91d53ca3 Split build process 2025-02-22 12:34:24 -05:00
Tom Moor 8262c91319 v0.82.1-3 2025-02-22 11:48:57 -05:00
Tom Moor 41347970f5 Selective tests 2025-02-22 11:48:37 -05:00
Tom Moor f0a04639ad v0.82.1-2 2025-02-22 11:33:40 -05:00
Tom Moor 12e4436e3a chore: Larger image 2025-02-22 11:33:32 -05:00
Tom Moor 78383a1fbf v0.82.1-1 2025-02-22 11:13:53 -05:00
Tom Moor 29482c8307 fix 2025-02-22 11:12:41 -05:00
Tom Moor 9ea218af9b v0.82.1-0 2025-02-22 10:56:52 -05:00
4 changed files with 190 additions and 25 deletions
+29 -2
View File
@@ -59,8 +59,30 @@ jobs:
- run: yarn install --frozen-lockfile
- run: yarn tsc
changes:
runs-on: ubuntu-latest
outputs:
server: ${{ steps.filter.outputs.server }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
server:
- 'server/**'
- 'shared/**'
- 'package.json'
- 'yarn.lock'
app:
- 'app/**'
- 'shared/**'
- 'package.json'
- 'yarn.lock'
test:
needs: build
if: ${{ needs.changes.outputs.app == 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
@@ -75,7 +97,8 @@ jobs:
- run: yarn test:${{ matrix.test-group }}
test-server:
needs: build
needs: [build, changes]
if: ${{ needs.changes.outputs.server == 'true' }}
runs-on: ubuntu-latest
services:
postgres:
@@ -121,6 +144,7 @@ jobs:
bundle-size:
needs: [build, types]
if: ${{ needs.changes.outputs.app == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -133,4 +157,7 @@ jobs:
run: echo "NODE_ENV=production" >> $GITHUB_ENV
- run: yarn vite:build
- name: Send bundle stats to RelativeCI
run: npx relative-ci-agent
uses: relative-ci/agent-action@v2
with:
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
+158 -20
View File
@@ -1,4 +1,4 @@
name: Docker
name: Docker build
on:
push:
@@ -10,7 +10,116 @@ env:
BASE_IMAGE_NAME: outlinewiki/outline-base
jobs:
build-and-push:
prepare:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.VERSION }}
is_prerelease: ${{ steps.check_prerelease.outputs.IS_PRERELEASE }}
steps:
- name: Extract version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Check if prerelease
id: check_prerelease
run: |
if [[ "${{ steps.version.outputs.VERSION }}" == *"-"* ]]; then
echo "IS_PRERELEASE=true" >> $GITHUB_OUTPUT
else
echo "IS_PRERELEASE=false" >> $GITHUB_OUTPUT
fi
build-base:
runs-on: ubuntu-latest
needs: prepare
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64/v8
- linux/arm/v7
- linux/ppc64le
- linux/s390x
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push base image
id: build
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.base
push: true
platforms: ${{ matrix.platform }}
outputs: type=image,name=${{ env.BASE_IMAGE_NAME }},push-by-digest=true
- name: Export digest
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v3
with:
name: base-digests
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
merge-base-manifests:
needs: [prepare, build-base]
runs-on: ubuntu-latest
steps:
- name: Download digests
uses: actions/download-artifact@v3
with:
name: base-digests
path: ${{ runner.temp }}/base-digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Create manifest list and push
run: |
TAGS="-t ${{ env.BASE_IMAGE_NAME }}:${{ needs.prepare.outputs.version }}"
if [[ "${{ needs.prepare.outputs.is_prerelease }}" == "false" ]]; then
TAGS="$TAGS -t ${{ env.BASE_IMAGE_NAME }}:latest"
fi
docker buildx imagetools create $TAGS \
$(cd ${{ runner.temp }}/base-digests && printf "${{ env.BASE_IMAGE_NAME }}@sha256:%s " *)
build-main:
needs: [prepare, merge-base-manifests]
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64/v8
- linux/arm/v7
- linux/ppc64le
- linux/s390x
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -26,27 +135,56 @@ jobs:
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push base image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.base
push: true
tags: ${{ env.BASE_IMAGE_NAME }}:latest
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
- name: Extract version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push main image
id: build
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}
platforms: ${{ matrix.platform }}
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true
- name: Export digest
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v3
with:
name: main-digests
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
merge-main-manifests:
needs: [prepare, build-main]
runs-on: ubuntu-latest
steps:
- name: Download digests
uses: actions/download-artifact@v3
with:
name: main-digests
path: ${{ runner.temp }}/main-digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Create manifest list and push
run: |
TAGS="-t ${{ env.IMAGE_NAME }}:${{ needs.prepare.outputs.version }}"
if [[ "${{ needs.prepare.outputs.is_prerelease }}" == "false" ]]; then
TAGS="$TAGS -t ${{ env.IMAGE_NAME }}:latest"
fi
docker buildx imagetools create $TAGS \
$(cd ${{ runner.temp }}/main-digests && printf "${{ env.IMAGE_NAME }}@sha256:%s " *)
+2 -2
View File
@@ -3,7 +3,7 @@ Business Source License 1.1
Parameters
Licensor: General Outline, Inc.
Licensed Work: Outline 0.82.0
Licensed Work: Outline 0.82.1-5
The Licensed Work is (c) 2025 General Outline, Inc.
Additional Use Grant: You may make use of the Licensed Work, provided that
you may not use the Licensed Work for a Document
@@ -15,7 +15,7 @@ Additional Use Grant: You may make use of the Licensed Work, provided that
Licensed Work by creating teams and documents
controlled by such third parties.
Change Date: 2029-02-15
Change Date: 2029-02-22
Change License: Apache License, Version 2.0
+1 -1
View File
@@ -370,5 +370,5 @@
"qs": "6.9.7",
"rollup": "^4.5.1"
},
"version": "0.82.0"
"version": "0.82.1-5"
}