-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (33 loc) · 1.05 KB
/
3.approve-snapshot.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
name: 3. Approve Snapshot
on:
push:
branches:
- ci/approve-snapshot
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ldi-orchestrator
jobs:
approve-snapshot:
#if: github.ref == "refs/heads/main"
name: Approve Snapshot and Promote
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 18
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 18
- name: Define docker variables
run: |
export VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
echo "version=$VERSION" >> $GITHUB_ENV
echo "current version: ${{ env.version }}"
if [[ "$env.version" == *"SNAPSHOT"* ]]; then
echo "Dealing with a snapshot version. Current version: ${{ env.version }}"
echo "New version: ${{ env.version //-SNAPSHOT//g }}"
else
echo "Already released. Current version: ${{ env.version }}"
fi