-
Notifications
You must be signed in to change notification settings - Fork 10
65 lines (58 loc) · 1.65 KB
/
build.yaml
File metadata and controls
65 lines (58 loc) · 1.65 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
---
name: Build Docker images
on:
workflow_call:
inputs:
push:
required: false
type: boolean
secrets:
DOCKERHUB_TOKEN:
required: false
permissions:
contents: read
jobs:
prepare:
name: Build (and push) Docker image
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: tobix
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ inputs.push }}
- name: Detect image metadata
id: meta
uses: docker/metadata-action@v6
with:
images: tobix/wine
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build stable
uses: docker/build-push-action@v7
with:
push: ${{ inputs.push }}
tags: tobix/wine:stable
labels: ${{ steps.meta.outputs.labels }}
build-args: |
WINE_FLAVOUR=stable
cache-to: type=local,dest=/tmp/buildx-cache,mode=max
- name: Build devel
uses: docker/build-push-action@v7
with:
push: ${{ inputs.push }}
tags: tobix/wine:devel
labels: ${{ steps.meta.outputs.labels }}
build-args: |
WINE_FLAVOUR=devel
cache-from: type=local,src=/tmp/buildx-cache
- name: Build staging
uses: docker/build-push-action@v7
with:
push: ${{ inputs.push }}
tags: tobix/wine:staging
labels: ${{ steps.meta.outputs.labels }}
build-args: |
WINE_FLAVOUR=staging
cache-from: type=local,src=/tmp/buildx-cache