-
Notifications
You must be signed in to change notification settings - Fork 2.8k
52 lines (42 loc) · 1.69 KB
/
docker-release.yml
File metadata and controls
52 lines (42 loc) · 1.69 KB
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: Release Docker Images
on: workflow_dispatch
jobs:
release_docker_images:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
java-version: '21'
- name: Get current project meta
id: meta
run: echo "::set-output name=version::$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)"
- name: Build Docker images with Maven
run: |
./mvnw clean package -B -Dstyle.color=always \
-P distro,dockerPublish \
-pl :flowable-app-rest \
-D docker.publisher.user=${{ secrets.DOCKER_USER }} \
-D docker.publisher.password=${{ secrets.DOCKER_PASSWORD }} \
-B -V --no-transfer-progress
- name: Install Cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
- name: Write signing key to disk
run: echo "${{ secrets.SIGNING_SECRET }}" > cosign.key
- name: Log into dockerhub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Sign the published Docker images
env:
COSIGN_PASSWORD: ""
run: |
cosign sign --key cosign.key \
-a "repo=${{ github.repository }}" \
-a "ref=${{ github.sha }}" \
flowable/flowable-rest:${{ steps.meta.outputs.version }} \
-y