Skip to content

Commit

Permalink
feat(ci): introducing parameterized DOCKERHUB_PLATFORMS
Browse files Browse the repository at this point in the history
  • Loading branch information
visibilityspots committed Nov 20, 2024
1 parent d0da83c commit 3c1fce0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
tags:
- '*'
workflow_call:
inputs:
platforms:
required: false
type: string
default: "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64"
secrets:
DOCKERHUB_TOKEN:
required: true
Expand All @@ -13,6 +18,7 @@ on:
env:
DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
DOCKERHUB_REPOSITORY: ${{ vars.DOCKERHUB_REPOSITORY }}
DOCKERHUB_PLATFORMS: ${{ inputs.platforms}}

jobs:
test:
Expand Down Expand Up @@ -55,7 +61,7 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
platforms: ${{ env.DOCKERHUB_PLATFORMS }}
push: true
tags: |
${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:latest
Expand Down

0 comments on commit 3c1fce0

Please sign in to comment.