Skip to content

Commit

Permalink
Merge pull request #511 from FgForrest/master-backup-before-mvcc
Browse files Browse the repository at this point in the history
Master backup before mvcc #4
  • Loading branch information
novoj authored Apr 15, 2024
2 parents d3d6a75 + 566a1cb commit 50b09a6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
run: |
export CURRENT_VERSION="${{ steps.release_version.outputs.version }}"
export NEW_VERSION="$( echo ${CURRENT_VERSION} | sed 's/^v//')"
echo $NEW_VERSION > version.txt
mvn versions:set -DnewVersion=$NEW_VERSION
mvn -T 1C -B -P release-sign-artifacts -Dmaven.test.skip=true deploy --file pom.xml
env:
Expand Down Expand Up @@ -125,3 +126,10 @@ jobs:
with:
name: evita-server.jar
path: 'evita_server/target/evita-server.jar'

- name: Upload evitaDB version.txt # upload `version.txt` for `docker-latest.yml` to deploy to DockerHub
uses: actions/upload-artifact@v2
if: success()
with:
name: evita-server.jar
path: 'version.txt'
17 changes: 13 additions & 4 deletions .github/workflows/docker-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@ jobs:
steps:
- uses: actions/checkout@v3 # checkout from Git

- name: Download a single artifact # download `evita-server.jar` artifact if the workflow we react to was successful
- name: Download a JAR file to deploy # download `evita-server.jar` artifact if the workflow we react to was successful
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
name: evita-server.jar
path: docker

- name: Download a version information # download `version.txt` artifact if the workflow we react to was successful
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
name: version.txt

- name: Set up QEMU
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
Expand All @@ -43,13 +50,15 @@ jobs:
- name: Extract major version
id: major_version
# create a new output variable with the major version (like 2024.4)
run: echo "version=$(echo '${{ github.event.workflow_run.outputs.released_version }}' | cut -d'.' -f1,2)" >> $GITHUB_OUTPUT
run: |
echo "$(cat version.txt)"
echo "version=$(cat version.txt | cut -d'.' -f1,2)"
echo "version=$(cat version.txt | cut -d'.' -f1,2)" >> $GITHUB_ENV
- name: Build and push Docker image
env:
RELEASE_IMAGE: "evitadb:latest"
EVITA_JAR_NAME: evita-server.jar
MAJOR_VERSION: ${{ steps.major_version.outputs.version }}
uses: docker/build-push-action@v3
with:
context: ./docker
Expand All @@ -58,7 +67,7 @@ jobs:
push: true
tags: |
${{ vars.CI_REGISTRY_USER }}/${{ env.RELEASE_IMAGE }}
${{ vars.CI_REGISTRY_USER }}/evitadb:${{ env.MAJOR_VERSION }}
${{ vars.CI_REGISTRY_USER }}/evitadb:${{ env.version }}
platforms: linux/amd64,linux/arm64/v8
build-args: |
EVITA_JAR_NAME=${{ env.EVITA_JAR_NAME }}

0 comments on commit 50b09a6

Please sign in to comment.