mirror of https://github.com/laurent22/joplin.git
Server: Trying to build ARM64 Docker image
parent
c921976e9d
commit
e74d5e7c23
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "GIT_TAG_NAME=$GIT_TAG_NAME"
|
||||
echo "SERVER_TAG_PREFIX=$SERVER_TAG_PREFIX"
|
||||
echo "SERVER_REPOSITORY=$SERVER_REPOSITORY"
|
||||
|
||||
# Check if it's a server release, otherwise exit
|
||||
if [[ $GIT_TAG_NAME != $SERVER_TAG_PREFIX-* ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
docker manifest create $SERVER_REPOSITORY:$GIT_TAG_NAME \
|
||||
$SERVER_REPOSITORY:arm64-$GIT_TAG_NAME \
|
||||
$SERVER_REPOSITORY:amd64-$GIT_TAG_NAME
|
||||
|
||||
docker manifest annotate $SERVER_REPOSITORY:$GIT_TAG_NAME $SERVER_REPOSITORY:arm64-$GIT_TAG_NAME --arch arm64
|
||||
docker manifest annotate $SERVER_REPOSITORY:$GIT_TAG_NAME $SERVER_REPOSITORY:amd64-$GIT_TAG_NAME --arch amd64
|
||||
|
||||
docker manifest push $SERVER_REPOSITORY:$GIT_TAG_NAME
|
|
@ -84,6 +84,14 @@ jobs:
|
|||
run: |
|
||||
yarn install && cd packages/app-desktop && yarn dist --publish=never
|
||||
|
||||
- name: Publish Docker manifest
|
||||
if: runner.os == 'Linux'
|
||||
env:
|
||||
SERVER_REPOSITORY: joplin/server
|
||||
SERVER_TAG_PREFIX: server
|
||||
run: |
|
||||
"${GITHUB_WORKSPACE}/.github/scripts/publish_docker_manifest.sh"
|
||||
|
||||
ServerDockerImage:
|
||||
if: github.repository == 'laurent22/joplin'
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
|
|
@ -87,6 +87,7 @@ async function main() {
|
|||
const tagName = argv.tagName || `server-${await execCommand('git describe --tags --match v*', { showStdout: false })}`;
|
||||
const platform = argv.platform;
|
||||
const source = argv.source;
|
||||
const architecture = argv.platform.split('/')[1];
|
||||
|
||||
const isPreRelease = getIsPreRelease(tagName);
|
||||
const imageVersion = getVersionFromTag(tagName, isPreRelease);
|
||||
|
@ -132,7 +133,7 @@ async function main() {
|
|||
|
||||
const cliArgs = ['--progress=plain'];
|
||||
cliArgs.push(`--platform ${platform}`);
|
||||
cliArgs.push(...dockerTags.map(tag => `--tag "${repository}:${tag}"`));
|
||||
cliArgs.push(...dockerTags.map(tag => `--tag "${repository}:${architecture}-${tag}"`));
|
||||
cliArgs.push(...buildArgs.map(arg => `--build-arg ${arg}`));
|
||||
if (pushImages) {
|
||||
cliArgs.push('--push');
|
||||
|
|
Loading…
Reference in New Issue