Skip to content

Commit

Permalink
build: attempt to create both adm64 and arm64 docker files
Browse files Browse the repository at this point in the history
Switched from RedHat to Azul JDK images.
  • Loading branch information
novoj committed Dec 26, 2023
1 parent 0ac5938 commit b5c7f52
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 24 deletions.
32 changes: 32 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
latest: 'true'

prerelease: true
prerelease-identifier: 'alpha'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
autolabeler:
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feature\/.+/'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

template: |
## Changes
$CHANGES
38 changes: 14 additions & 24 deletions .github/workflows/docker-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,17 @@ jobs:
buildkitd-flags: --debug
platforms: linux/amd64,linux/arm64/v8

- name: Build the Docker image # now build the Docker image, login to DockerHub and push it, then clean everything
env:
BUILD_ROOT: docker
CI_REGISTRY: ${{vars.CI_REGISTRY}}
CI_REGISTRY_IMAGE: ${{vars.CI_REGISTRY_IMAGE}}
RELEASE_IMAGE: "evitadb:canary"
CI_REGISTRY_USER: ${{vars.CI_REGISTRY_USER}}
CI_REGISTRY_PASSWORD: ${{secrets.CI_REGISTRY_PASSWORD}}
EVITA_JAR_NAME: evita-server.jar
run: |
echo "Evita JAR name: $EVITA_JAR_NAME"
echo "Build root: $BUILD_ROOT"
mv -v "$EVITA_JAR_NAME" "$BUILD_ROOT/$EVITA_JAR_NAME"
cd $BUILD_ROOT
ls -la .
EVITA_JAR_NAME="$EVITA_JAR_NAME"
echo "Tagging as: $CI_REGISTRY_USER/$RELEASE_IMAGE"
docker buildx . --pull -t "$CI_REGISTRY_USER/$RELEASE_IMAGE" --build-arg "EVITA_JAR_NAME=$EVITA_JAR_NAME"
echo "$CI_REGISTRY_PASSWORD" | docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" --password-stdin
echo "Pushing image: $CI_REGISTRY_IMAGE/$CI_REGISTRY_USER/$RELEASE_IMAGE"
docker push "$CI_REGISTRY_IMAGE/$CI_REGISTRY_USER/$RELEASE_IMAGE"
docker logout "$CI_REGISTRY"
echo "Cleaning"
docker rmi "$CI_REGISTRY_USER/$RELEASE_IMAGE"
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ vars.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./docker/
file: ./docker/Dockerfile
push: true
tags: ${{ vars.CI_REGISTRY_USER }}/evitadb:canary
platforms: linux/amd64,linux/arm64/v8

0 comments on commit b5c7f52

Please sign in to comment.