-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
89 lines (87 loc) · 2.45 KB
/
action.yaml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: 'images'
description: 'Build container images'
inputs:
build-opts:
description: 'build options in YAML format (see README.md)'
required: true
registry:
description: 'registry'
required: true
registry-user:
description: "registry's user"
required: true
registry-password:
description: "registry's password"
required: true
platforms:
description: 'platforms'
required: false
default: ''
tag:
description: 'image tag'
required: true
operation:
description: '<push|build|build-and-push>'
required: true
latest:
description: 'latest tag'
required: false
default: 'false'
cache-from:
description: 'cache from https://docs.docker.com/build/ci/github-actions/cache/'
required: false
default: ''
cache-to:
description: 'cache from https://docs.docker.com/build/ci/github-actions/cache/'
required: false
default: ''
github-token:
description: 'github token'
required: false
default: ''
outputs:
copy-files:
description: 'copy files'
value: ${{ steps.images.outputs.copy-files }}
build-opts:
description: 'build opts'
value: ${{ steps.images.outputs.build-opts }}
pushed-images:
description: 'pushed images'
value: ${{ steps.images.outputs.pushed-images }}
built-images:
description: 'built images'
value: ${{ steps.images.outputs.built-images }}
runs:
using: "composite"
steps:
- name: Set up Docker Buildx
# nosemgrep
uses: docker/setup-buildx-action@master
if: inputs.cache-from != '' || inputs.cache-to != ''
- name: Set up Docker Buildx
# nosemgrep
uses: docker/setup-buildx-action@master
if: inputs.platforms != ''
with:
platforms: ${{ inputs.platforms }}
- name: Login to registry
# nosemgrep
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.registry-user }}
password: ${{ inputs.registry-password }}
- name: images
uses: orangeappsru/build-images-action/js-action@main
id: images
with:
build-opts: ${{ inputs.build-opts }}
registry: ${{ inputs.registry }}
tag: ${{ inputs.tag }}
operation: ${{ inputs.operation }}
platforms: ${{ inputs.platforms }}
github-token: ${{ inputs.github-token }}
latest: ${{ inputs.latest }}
cache-from: ${{ inputs.cache-from }}
cache-to: ${{ inputs.cache-to }}