Skip to content

Commit

Permalink
Simplify build workflow required parameters
Browse files Browse the repository at this point in the history
Just make the defaults the safest option, which inturn should correct
the current build error.
  • Loading branch information
frison committed Nov 28, 2023
1 parent 2ef9087 commit 8be9af7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
12 changes: 7 additions & 5 deletions .github/actions/build-test-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ description: "Publish to dockerhub with multiplatform support"
inputs:
dockerhub-username:
description: "The dockerhub username to authenticate with and push the image to"
required: true
required: false
default: ${{ vars.DOCKERHUB_USERNAME }}
dockerhub-token:
description: "The dockerhub token to authenticate with and push the image to"
required: true
required: false
default: ${{ secrets.DOCKERHUB_TOKEN }}
language:
description: "The language to build an image for"
required: true
Expand All @@ -16,11 +18,11 @@ inputs:
required: true
test:
description: "Whether to run tests"
required: true
required: false
default: "true"
publish:
description: "Whether to publish images"
required: true
required: false
default: "false"
runs:
using: "composite"
Expand Down Expand Up @@ -138,6 +140,6 @@ runs:
with:
username: ${{ inputs.dockerhub-username }}
password: ${{ inputs.dockerhub-token }}
repository: 100hellos/${{ inputs.language }}
repository: ${{ inputs.dockerhub-username }}/${{ inputs.language }}
short-description: "\"Hello World!\" Written in ${{ inputs.language }}"
readme-filepath: ./${{ inputs.language }}/README-Generated.md
4 changes: 0 additions & 4 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ jobs:
uses: ./.github/actions/build-test-publish
continue-on-error: false
with:
dockerhub-username: ${{ vars.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
platforms: linux/amd64
language: ${{ matrix.language }}
test: ${{ inputs.test }}
publish: false

publish:
name: 🚀 ${{ matrix.language }} (linux/amd64)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,5 @@ jobs:
secrets: inherit
with:
languages: ${{ needs.what-to-build.outputs.languages }}
test: true
publish: ${{ github.ref == 'refs/heads/main' }}

1 change: 0 additions & 1 deletion .github/workflows/weekly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ jobs:
secrets: inherit
with:
languages: ${{ needs.what-to-build.outputs.languages }}
test: true
publish: true

0 comments on commit 8be9af7

Please sign in to comment.