-
Notifications
You must be signed in to change notification settings - Fork 14
112 lines (100 loc) · 3.55 KB
/
nightly.yml
File metadata and controls
112 lines (100 loc) · 3.55 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Docker nightly
on:
push:
branches:
- master
tags-ignore:
- '*'
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
# set docker tag for all steps
env:
DOCKERTAG: nightly
jobs:
docker_build:
runs-on: ${{ matrix.target.runs }}
permissions:
packages: write
contents: read
strategy:
fail-fast: false
matrix:
os:
- rocky
- debian
target:
- runs: ubuntu-24.04
platform: amd64
- runs: ubuntu-24.04-arm
platform: arm64
steps:
- name: Check out the repo
uses: actions/checkout@v6
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.PTA }}
- name: Build and Push
uses: docker/build-push-action@v6
with:
push: true
file: Dockerfile.omd-labs-${{ matrix.os }}
build-args: |
OMD_VERSION=${{ github.ref }}
INSTALL_COMMON_RETRIES=3
tags: |
consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-${{ matrix.target.platform }}
ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-${{ matrix.target.platform }}
platforms: linux/${{ matrix.target.platform }}
manifest:
runs-on: ubuntu-24.04
needs: docker_build
permissions:
packages: write
contents: read
strategy:
fail-fast: false
matrix:
os:
- rocky
- debian
steps:
- uses: actions/checkout@v6
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.PTA }}
- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: push manifest to dockerhub
run: |
docker manifest create consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }} \
consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-amd64 \
consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-arm64
docker manifest push consol/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}
- name: push manifest to github
run: |
docker manifest create ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }} \
ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-amd64 \
ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}-arm64
docker manifest push ghcr.io/consol/omd-labs-docker/omd-labs-${{ matrix.os }}:${{ env.DOCKERTAG }}