Skip to content

Commit

Permalink
feat: Adding docker multi-arch build
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Oct 29, 2022
1 parent d08b358 commit 9f93704
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # every sunday at midnight
- cron: "0 0 * * 0" # every sunday at midnight

jobs:
build:
Expand All @@ -15,34 +15,42 @@ jobs:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v1

- name: Docker build and test
run: |
.bin/build-image.sh
.bin/test-image.sh
- name: Checkout repository
uses: actions/checkout@v3
- name: Docker build and test
run: |
.bin/build-image.sh
.bin/test-image.sh
deploy:
needs: [build]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: publish release docker image
uses: docker/build-push-action@v1
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: "arm64,arm"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: publish release docker image
uses: docker/build-push-action@v3
with:
repository: toolisticon/kalilinux
tags: latest
if: contains( github.ref, 'master' ) || contains( github.base_ref, 'master' )

- name: publish preview docker image
uses: docker/build-push-action@v1
uses: docker/build-push-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: toolisticon/kalilinux
tags: next
if: contains( github.ref, 'develop' ) || contains( github.base_ref, 'develop' )

0 comments on commit 9f93704

Please sign in to comment.