Skip to content

Commit 7f2008a

Browse files
committed
Merge branch 'main' into dev
2 parents e3d206d + a2e4577 commit 7f2008a

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: 'Build base:alpine-core:vod'
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
push:
7+
branches:
8+
- vod
9+
10+
jobs:
11+
docker:
12+
runs-on: [self-hosted]
13+
strategy:
14+
matrix:
15+
branch:
16+
- vod
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
ref: ${{ matrix.branch }}
23+
24+
- uses: actions-ecosystem/action-get-latest-tag@v1
25+
id: get-latest-tag
26+
with:
27+
semver_only: true
28+
29+
- uses: cardinalby/export-env-action@v1
30+
with:
31+
envFile: '.github_build/Build.alpine.env'
32+
export: 'true'
33+
expandWithJobEnv: 'true'
34+
expand: 'true'
35+
36+
- name: Docker meta
37+
id: meta
38+
uses: docker/metadata-action@v4
39+
with:
40+
images: |
41+
datarhei/base
42+
tags: |
43+
type=raw,value=${{ env.OS_NAME }}-core-vod,enable=${{ matrix.branch == 'vod' }}
44+
45+
- name: Set up QEMU
46+
uses: docker/setup-qemu-action@master
47+
with:
48+
platforms: all
49+
50+
- name: Set up Docker Buildx
51+
id: buildx
52+
uses: docker/setup-buildx-action@master
53+
54+
- name: Cache Docker layers
55+
uses: actions/cache@v2
56+
with:
57+
path: /tmp/.buildx-cache
58+
key: ${{ runner.os }}-buildx-${{ github.sha }}
59+
restore-keys: |
60+
${{ runner.os }}-buildx-
61+
62+
- name: Login to DockerHub
63+
if: github.event_name != 'pull_request'
64+
uses: docker/login-action@v1
65+
with:
66+
username: ${{ secrets.DOCKER_USERNAME }}
67+
password: ${{ secrets.DOCKER_PASSWORD }}
68+
69+
- name: Build Multi-Arch
70+
uses: docker/build-push-action@v2
71+
with:
72+
builder: ${{ steps.buildx.outputs.name }}
73+
context: .
74+
file: ./Dockerfile
75+
build-args: |
76+
BUILD_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }}
77+
GOLANG_IMAGE=${{ env.GOLANG_IMAGE }}
78+
platforms: linux/amd64
79+
push: true
80+
tags: ${{ steps.meta.outputs.tags }}
81+
labels: ${{ steps.meta.outputs.labels }}
82+
cache-from: type=local,src=/tmp/.buildx-cache
83+
cache-to: type=local,dest=/tmp/.buildx-cache-new

0 commit comments

Comments
 (0)