Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit ab18014

Browse files
Merge pull request #31 from wickywaka/pull-request
Publish Multi-Arch images using github actions
2 parents debb6d8 + 4d685fd commit ab18014

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and Push latest
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-push-latest:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v2
14+
15+
- name: Setup QEMU
16+
id: qemu
17+
uses: docker/[email protected]
18+
with:
19+
platforms: linux/amd64,linux/arm/v7,linux/arm64
20+
21+
- name: Set up Docker Buildx
22+
id: buildx
23+
uses: docker/[email protected]
24+
25+
- name: Login to Docker Hub
26+
uses: docker/[email protected]
27+
with:
28+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
29+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
30+
31+
- name: Build and Push Dockerfile.ldap
32+
id: docker_build_ldap
33+
uses: docker/build-push-action@v2
34+
with:
35+
platforms: linux/amd64,linux/arm/v7,linux/arm64
36+
push: true
37+
file: Dockerfile.ldap
38+
tags: networkboot/dhcpd:ldap-latest
39+
40+
41+
- name: Print LDAP Image Digest
42+
run: echo ${{ steps.docker_build_ldap.outputs.digest }}
43+
44+
- name: Build and Push Dockerfile
45+
id: docker_build
46+
uses: docker/build-push-action@v2
47+
with:
48+
platforms: linux/amd64,linux/arm/v7,linux/arm64
49+
push: true
50+
tags: networkboot/dhcpd:latest
51+
52+
53+
- name: Print Image Digest
54+
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/dockerize-tag.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build and Push Tag
2+
on:
3+
push:
4+
tags:
5+
- 'v[0-9]+.[0-9]+.[0-9]+*'
6+
jobs:
7+
build-push-tag:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: olegtarasov/[email protected]
11+
id: get-tag
12+
with:
13+
tagRegex: "v(.*)"
14+
15+
- name: Parse Semver String
16+
id: semver-parser
17+
uses: booxmedialtd/ws-action-parse-semver@v1
18+
with:
19+
input_string: "${{ steps.get-tag.outputs.tag }}"
20+
21+
- name: Checkout Repository
22+
uses: actions/checkout@v2
23+
24+
- name: Setup QEMU
25+
id: qemu
26+
uses: docker/[email protected]
27+
with:
28+
platforms: linux/amd64,linux/arm/v7,linux/arm64
29+
30+
- name: Set up Docker Buildx
31+
id: buildx
32+
uses: docker/[email protected]
33+
34+
- name: Login to Docker Hub
35+
uses: docker/[email protected]
36+
with:
37+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
38+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
39+
40+
41+
- name: Build and Push ldap
42+
id: docker_build_ldap
43+
uses: docker/build-push-action@v2
44+
with:
45+
platforms: linux/amd64,linux/arm/v7,linux/arm64
46+
push: true
47+
file: Dockerfile.ldap
48+
tags:
49+
networkboot/dhcpd:ldap-${{ steps.semver-parser.outputs.fullversion }},
50+
networkboot/dhcpd:ldap-${{ steps.semver-parser.outputs.major }}
51+
52+
- name: Print LDAP Image Digest
53+
run: echo ${{ steps.docker_build_ldap.outputs.digest }}
54+
55+
- name: Build and Push
56+
id: docker_build
57+
uses: docker/build-push-action@v2
58+
with:
59+
platforms: linux/amd64,linux/arm/v7,linux/arm64
60+
push: true
61+
tags:
62+
networkboot/dhcpd:${{ steps.semver-parser.outputs.fullversion }},
63+
networkboot/dhcpd:${{ steps.semver-parser.outputs.major }}
64+
65+
- name: Print Image Digest
66+
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)