Skip to content

Commit

Permalink
build amd64 for alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
amancevice committed Oct 2, 2023
1 parent 61094bf commit b907716
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
9 changes: 8 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ inputs:
file:
description: Dockerfile
required: true
platforms:
description: Docker build platform(s)
default: linux/amd64,linux/arm64
push:
description: Push image to Docker hub
default: "false"
runs:
using: composite
steps:
Expand All @@ -28,5 +34,6 @@ runs:
- uses: docker/build-push-action@v5
with:
file: ${{ inputs.file }}
platforms: linux/amd64,linux/arm64
platforms: ${{ inputs.platforms }}
push: ${{ inputs.push }}
tags: ${{ steps.meta.outputs.tags }}
19 changes: 18 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- Dockerfile*
- Pipfile.lock
jobs:
build:
build-multiarch:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -26,3 +26,20 @@ jobs:
uses: ./.github/actions/build
with:
file: ${{ matrix.file }}
build-amd64:
runs-on: ubuntu-latest
strategy:
matrix:
file:
- Dockerfile.alpine
steps:
- uses: actions/checkout@v3
- name: lint ${{ matrix.file }}
uses: ./.github/actions/lint
with:
file: ${{ matrix.file }}
- name: build ${{ matrix.file }}
uses: ./.github/actions/build
with:
file: ${{ matrix.file }}
platforms: linux/amd64
28 changes: 24 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ on:
tags:
- "*"
jobs:
build-push:
build-push-multiarch:
runs-on: ubuntu-latest
strategy:
matrix:
file:
- Dockerfile
- Dockerfile.alpine
- Dockerfile.jupyter
- Dockerfile.slim
steps:
Expand All @@ -27,5 +26,26 @@ jobs:
uses: ./.github/actions/build
with:
file: ${{ matrix.file }}
platform: ${{ matrix.platform }}
- run: make push
push: true
build-push-amd64:
runs-on: ubuntu-latest
strategy:
matrix:
file:
- Dockerfile.alpine
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: lint ${{ matrix.file }}
uses: ./.github/actions/lint
with:
file: ${{ matrix.file }}
- name: build ${{ matrix.file }}
uses: ./.github/actions/build
with:
file: ${{ matrix.file }}
platforms: linux/amd64
push: true

0 comments on commit b907716

Please sign in to comment.