-
Notifications
You must be signed in to change notification settings - Fork 556
/
action.yml
42 lines (39 loc) · 1.44 KB
/
action.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
# This action expects the docker to be setup beforehand
---
name: Verify Zeebe Docker Image
description: Verifies metadata of the Zeebe Docker image
inputs:
imageName:
description: 'Full name of the image, without the tag.'
required: true
date:
description: 'Date when the image to verify was built, used to verify the date label of the image.'
required: true
version:
description: 'Version tag of the image to verify.'
required: true
revision:
description: 'Revision from which the image to verify was built, used to verify the date label of the image.'
required: true
platforms:
# See https://docs.docker.com/build/ci/github-actions/examples/#multi-platform-images
description: 'Comma separated-list of platforms to verify the image for; defaults to linux/amd64'
required: false
default: 'linux/amd64'
runs:
using: composite
steps:
- name: Verify Docker image
id: verify-docker-image
shell: bash
env:
DATE: ${{ inputs.date }}
REVISION: ${{ inputs.revision }}
VERSION: ${{ inputs.version }}
PLATFORMS_RAW: ${{ inputs.platforms }}
run: |
declare -a platforms=(${PLATFORMS_RAW//,/ })
for platform in "${platforms[@]}"; do
docker pull --platform "$platform" "${{ inputs.imageName }}:${VERSION}"
${PWD}/docker/test/verify.sh "${{ inputs.imageName }}:${VERSION}" "$(echo $platform | cut -d '/' -f 2)"
done