Skip to content

Commit

Permalink
Improve version info, add release-tag action
Browse files Browse the repository at this point in the history
add run link to version info

correct image for tests (remove dspace-dependencies from migrate to 7.5)

add action to release on tagging
  • Loading branch information
MajoBerger authored Mar 1, 2024
1 parent d287a7a commit 905a8d9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: Release

on:
push:
# Pattern matched against refs/tags
tags:
- '**'


env:
IMAGE_BASE_NAME: dataquest/dspace

jobs:
retag-BE-image:
steps:
Expand All @@ -15,14 +16,12 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: retag image
run: |
echo attempting go pull dataquest/dspace:${{ github.sha }}
echo then will use ${{ github.ref_name }} as a tag
docker pull dataquest/dspace:${{ github.sha }}
docker tag dataquest/dspace:${{ github.sha }} dataquest/dspace:${{ github.ref_name }}
docker pull ${{ env.IMAGE_BASE_NAME }}:${{ github.sha }}
docker tag ${{ env.IMAGE_BASE_NAME }}:${{ github.sha }} ${{ env.IMAGE_BASE_NAME }}:${{ github.ref_name }}
- name: push image
run: docker push dataquest/dspace:${{ github.ref_name }}
run: docker push ${{ env.IMAGE_BASE_NAME }}:${{ github.ref_name }}

2 changes: 1 addition & 1 deletion Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ARG JDK_VERSION=11

# Step 1 - Run Maven Build
FROM dataquest/dspace-dependencies:migrate-to-7.5 as build
FROM dataquest/dspace-dependencies:dspace-7_x as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ARG JDK_VERSION=11

# Step 1 - Run Maven Build
FROM dataquest/dspace-dependencies:migrate-to-7.5 as build
FROM dataquest/dspace-dependencies:dspace-7_x as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
Expand Down
11 changes: 5 additions & 6 deletions scripts/sourceversion.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import subprocess
import sys
from datetime import datetime

if __name__ == '__main__':
ts = datetime.now()
print(f"timestamp: {ts}")
print(f"This info was generated on: {ts}")

cmd = 'git log -1 --pretty=format:"%h - %ai"'
print(f">{cmd}")
cmd = 'git log -1 --pretty=format:"Git hash: %H Date of commit: %ai"'
subprocess.check_call(cmd, shell=True)

cmd = 'git status --porcelain'
print(f">{cmd}:")
subprocess.check_call(cmd, shell=True)
link = sys.argv[1] + sys.argv[2]
print(' Build run: ' + link + ' ')

0 comments on commit 905a8d9

Please sign in to comment.