-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
81 lines (77 loc) · 2.54 KB
/
Copy pathaction.yml
File metadata and controls
81 lines (77 loc) · 2.54 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
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
name: 'Build Container Image'
description: 'Create a docker container image'
inputs:
tags:
description: "List of image tags (newline separated) for the resulting container image"
required: true
type: string
push:
description: "If true, the image will be pushed to the registry"
required: false
default: false
type: boolean
platforms:
description: "Comma separated list of platforms to build the image for, i.e. 'linux/amd64,linux/arm64'"
required: false
default: "linux/amd64"
type: string
context:
description: "Context directory for the container image build"
required: false
default: "."
type: string
build-args:
description: "List of build arguments (newline separated) to be inserted in the container image build"
required: false
default: ""
type: string
file:
description: "Name of the dockerfile to build"
required: false
default: "Dockerfile"
type: string
no-cache:
description: "Set to false to enable caching of docker layers"
required: false
default: true
type: boolean
pull:
description: "Pull base images from the registry when not available locally"
required: false
default: true
type: boolean
token:
description: "GitHub token for logging into the ghcr container registry"
required: false
type: string
default: ${{ github.token }}
load:
description: "Make the built image available to the current job. Load is a shorthand for `--output=type=docker`"
required: false
type: boolean
default: false
runs:
using: composite
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Login to GitHub Container Registry
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ inputs.token }}
- name: Build${{ inputs.push && ' and push' || ''}}
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: "${{ inputs.context }}"
file: "${{ inputs.file }}"
platforms: "${{ inputs.platforms }}"
no-cache: ${{ inputs.no-cache }}
pull: ${{ inputs.pull }}
build-args: "${{ inputs.build-args }}"
push: ${{ inputs.push }}
tags: "${{ inputs.tags }}"
load: "${{ inputs.load }}"