This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (85 loc) · 2.6 KB
/
docker-builds.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
90
91
92
93
94
95
name: Docker builds - manual and tagged
on:
workflow_dispatch:
inputs:
image_tag:
description: "Image Tag value"
type: "string"
required: true
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+-?[a-zA-Z]*'
- '[0-9]+.[0-9]+.[0-9]+'
- '!bwsm-eso-provider-*'
paths:
- src/**
jobs:
docker-image-build:
environment: 'dockerhub'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Dockerhub Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}
- name: QEMU Setup
uses: docker/setup-qemu-action@v3
- name: Docker Buildx Setup
uses: docker/setup-buildx-action@v3
- name: Manual Build/Push - amd64
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
context: src
build-args: |
BWS_DL_ARCH=x86_64
tags: |
bojanraic/bwsm-eso:${{ inputs.image_tag }}
- name: Manual Build/Push - arm64
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
context: src
build-args: |
BWS_DL_ARCH=aarch64
tags: |
bojanraic/bwsm-eso:${{ inputs.image_tag }}
- name: Tagged Build/Push - amd64
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
context: src
build-args: |
BWS_DL_ARCH=x86_64
tags: |
bojanraic/bwsm-eso:${{ github.ref_name }}
bojanraic/bwsm-eso:latest
- name: Tagged Build/Push - arm64
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
context: src
build-args: |
BWS_DL_ARCH=aarch64
tags: |
bojanraic/bwsm-eso:${{ github.ref_name }}
bojanraic/bwsm-eso:latest
- name: Tagged Release
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
name: v${{ github.ref_name }}