-
Notifications
You must be signed in to change notification settings - Fork 583
52 lines (49 loc) · 1.6 KB
/
ci-images.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
name: CI - Images
on:
workflow_dispatch:
inputs:
version:
type: string
description: 'Version to build'
required: false
delete-tags:
required: false
type: boolean
default: false
description: 'Delete the image tags'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
jobs:
prepare:
name: Prepare Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: ${{ inputs.version == null || inputs.version == '' }}
- uses: actions/setup-java@v3
if: ${{ inputs.version == null || inputs.version == '' }}
with:
java-version: '17'
distribution: 'liberica'
- name: Version from POM
if: ${{ inputs.version == null || inputs.version == '' }}
shell: bash
run: |
./mvnw --version
./mvnw help:evaluate -s .settings.xml -Dexpression=project.version --no-transfer-progress > /dev/null
echo "VERSIONS=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Version from Input
if: ${{ inputs.version != null && inputs.version != '' }}
shell: bash
run: echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
outputs:
version: ${{ env.VERSION }}
images:
name: Build and Publish Images
needs: [ prepare ]
uses: ./.github/workflows/build-images.yml
with:
version: ${{ needs.prepare.outputs.version }}
delete-tags: ${{ inputs.delete-tags == 'true' }}
secrets: inherit