forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (26 loc) · 962 Bytes
/
tag-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Release
on:
push:
tags:
- '**'
env:
IMAGE_BASE_NAME: dataquest/dspace
jobs:
retag-BE-image:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: retag image
run: |
docker pull ${{ env.IMAGE_BASE_NAME }}:${{ github.sha }}
docker tag ${{ env.IMAGE_BASE_NAME }}:${{ github.sha }} ${{ env.IMAGE_BASE_NAME }}:${{ github.ref_name }}
docker pull ${{ env.IMAGE_BASE_NAME }}-cli:${{ github.sha }}
docker tag ${{ env.IMAGE_BASE_NAME }}-cli:${{ github.sha }} ${{ env.IMAGE_BASE_NAME }}-cli:${{ github.ref_name }}
- name: push image
run: |
docker push ${{ env.IMAGE_BASE_NAME }}:${{ github.ref_name }}
docker push ${{ env.IMAGE_BASE_NAME }}-cli:${{ github.ref_name }}