-
Notifications
You must be signed in to change notification settings - Fork 9
/
action.yml
70 lines (69 loc) · 2.3 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
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
name: 'docker-build-and-publish'
description: 'Builds docker images and publish them on request'
author: "Jeroen Knoops <jeroen.knoops@philips.com>"
branding:
icon: "anchor"
color: "gray-dark"
inputs:
dockerfile:
description: 'Path to Dockerfile'
required: true
image-name:
description: 'The name of the image'
required: true
tags:
description: 'String with tags, separated by a space'
required: true
push-branches:
description: 'Specifies branches to push, separated by a space'
default: 'master main'
push-on-git-tag:
description: 'Push when a git tag is created'
default: 'false'
base-dir:
description: 'Base directory to perform the build'
default: '.'
slsa-provenance:
description: 'Create SLSA Provenance json'
required: false
sbom:
description: 'Create Software Bill Of Material in SPDX format'
required: false
sign:
description: 'Sign image with Cosign. Requires COSIGN environment variables to be set. When used in combination with slsa-provenance / sbom it will also attach the results to the image.'
required: false
github_context:
description: 'internal (do not set): the "github" context object in json'
required: true
default: ${{ toJSON(github) }}
runner_context:
description: 'internal (do not set): the "runner" context object in json'
required: true
default: ${{ toJSON(runner) }}
outputs:
container-digest:
description: 'Container digest. Can be used for generating provenance and signing'
container-tags:
description: 'Container tags. Can be used for generating provenance and signing'
push-indicator:
description: 'Is set to true when containers have been pushed to the container repository'
slsa-provenance-file:
description: 'SLSA provenance filename if created'
sbom-file:
description: 'SBOM filename if created'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.dockerfile }}
- ${{ inputs.image-name }}
- ${{ inputs.tags }}
- ${{ inputs.push-branches }}
- ${{ inputs.base-dir }}
env:
SLSA_PROVENANCE: ${{ inputs.slsa-provenance }}
SBOM: ${{ inputs.sbom }}
SIGN: ${{ inputs.sign }}
PUSH_ON_GIT_TAG: ${{ inputs.push-on-git-tag }}
GITHUB_CONTEXT: ${{ inputs.github_context }}
RUNNER_CONTEXT: ${{ inputs.runner_context }}