-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from wickywaka/pull-request
Publish Multi-Arch images using github actions
- Loading branch information
Showing
2 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build and Push latest | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-push-latest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup QEMU | ||
id: qemu | ||
uses: docker/[email protected] | ||
with: | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- name: Build and Push Dockerfile.ldap | ||
id: docker_build_ldap | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
push: true | ||
file: Dockerfile.ldap | ||
tags: networkboot/dhcpd:ldap-latest | ||
|
||
|
||
- name: Print LDAP Image Digest | ||
run: echo ${{ steps.docker_build_ldap.outputs.digest }} | ||
|
||
- name: Build and Push Dockerfile | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
push: true | ||
tags: networkboot/dhcpd:latest | ||
|
||
|
||
- name: Print Image Digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build and Push Tag | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
jobs: | ||
build-push-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: olegtarasov/[email protected] | ||
id: get-tag | ||
with: | ||
tagRegex: "v(.*)" | ||
|
||
- name: Parse Semver String | ||
id: semver-parser | ||
uses: booxmedialtd/ws-action-parse-semver@v1 | ||
with: | ||
input_string: "${{ steps.get-tag.outputs.tag }}" | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup QEMU | ||
id: qemu | ||
uses: docker/[email protected] | ||
with: | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
|
||
- name: Build and Push ldap | ||
id: docker_build_ldap | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
push: true | ||
file: Dockerfile.ldap | ||
tags: | ||
networkboot/dhcpd:ldap-${{ steps.semver-parser.outputs.fullversion }}, | ||
networkboot/dhcpd:ldap-${{ steps.semver-parser.outputs.major }} | ||
|
||
- name: Print LDAP Image Digest | ||
run: echo ${{ steps.docker_build_ldap.outputs.digest }} | ||
|
||
- name: Build and Push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
push: true | ||
tags: | ||
networkboot/dhcpd:${{ steps.semver-parser.outputs.fullversion }}, | ||
networkboot/dhcpd:${{ steps.semver-parser.outputs.major }} | ||
|
||
- name: Print Image Digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |