-
-
Notifications
You must be signed in to change notification settings - Fork 86
75 lines (73 loc) · 2.23 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release
on:
workflow_dispatch:
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
check-latest: false
- name: Build with Maven
run: mvn -B install -DskipTests
- name: Create Tag
run: |
echo "RELEASE_TAG=`cat ./src/main/resources/.version`" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ./target/redis-rdb-cli-release.tar.gz,./target/redis-rdb-cli-release.zip
tag: ${{ env.RELEASE_TAG }}
name: ${{ env.RELEASE_TAG }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Build and Push latest
id: latest
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.REPO }}:latest
- name: Build and Push ${{ env.RELEASE_TAG }}
id: tag
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.REPO }}:${{ env.RELEASE_TAG }}
- name: Build and Push latest-native
id: latest-native
uses: docker/build-push-action@v4
with:
context: ./
file: ./DockerfileNative
push: true
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.REPO }}:latest-native
- name: Build and Push ${{ env.RELEASE_TAG }}-native
id: tag-native
uses: docker/build-push-action@v4
with:
context: ./
file: ./DockerfileNative
push: true
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.REPO }}:${{ env.RELEASE_TAG }}-native
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}