-
Notifications
You must be signed in to change notification settings - Fork 108
86 lines (75 loc) · 2.71 KB
/
docker-build-and-push.yml
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
name: Zetacored-Docker-Build
on:
release:
types:
- created
workflow_dispatch:
inputs:
version:
description: 'Docker Tag Version For Manual Execution'
required: false
default: ''
concurrency:
group: Zetacored-Docker-Build
cancel-in-progress: false
env:
DOCKER_REPO: "zetacored"
DOCKER_ORG: "zetachain"
DOCKER_REGISTRY: "https://index.docker.io/v1/"
jobs:
docker_build_ubuntu:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Version from the release title.
if: github.event_name == 'workflow_dispatch'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.release.name }}" >> $GITHUB_ENV
- name: Set Version for Hotfix Release from Input.
if: github.event_name == 'workflow_dispatch'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.inputs.version }}" >> ${GITHUB_ENV}
- name: "BUILD:PUSH:MONITORING:DOCKER:IMAGE"
uses: ./.github/actions/build-docker-images-generic
with:
DOCKER_FILENAME: "Dockerfile"
REPOSITORY_NAME: "${{ env.DOCKER_REPO }}"
IMAGE_TAG: "ubuntu-${{ env.GITHUB_TAG_MAJOR_VERSION }}"
REGISTRY: "${{ env.DOCKER_REGISTRY }}"
DOCKER_ORG: "${{ env.DOCKER_ORG }}"
USERNAME: "${{ secrets.DOCKER_HUB_USERNAME }}"
TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}"
DOCKER_FILE_DIRECTORY: "./"
DOCKER_BUILD_KIT: "0"
TAG_LATEST: "true"
docker_build_arm:
runs-on: buildjet-4vcpu-ubuntu-2204-arm
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Version from the release title.
if: github.event_name == 'workflow_dispatch'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.release.name }}" >> $GITHUB_ENV
- name: Set Version for Hotfix Release from Input.
if: github.event_name == 'workflow_dispatch'
run: |
echo "GITHUB_TAG_MAJOR_VERSION=${{ github.event.inputs.version }}" >> ${GITHUB_ENV}
- name: "BUILD:PUSH:MONITORING:DOCKER:IMAGE"
uses: ./.github/actions/build-docker-images-generic
with:
DOCKER_FILENAME: "Dockerfile"
REPOSITORY_NAME: "${{ env.DOCKER_REPO }}"
IMAGE_TAG: "arm-${{ env.GITHUB_TAG_MAJOR_VERSION }}"
REGISTRY: "${{ env.DOCKER_REGISTRY }}"
DOCKER_ORG: "${{ env.DOCKER_ORG }}"
USERNAME: "${{ secrets.DOCKER_HUB_USERNAME }}"
TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}"
DOCKER_FILE_DIRECTORY: "./"
DOCKER_BUILD_KIT: "0"
TAG_LATEST: "false"