Skip to content

Commit

Permalink
GHA: publish-docker workflow (#451)
Browse files Browse the repository at this point in the history
This allows for the gitlint docker image to be build and pushed
on-demand.
  • Loading branch information
jorisroovers authored Feb 17, 2023
1 parent 8ed865c commit 0426bb6
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Docker
run-name: "Publish Docker (gitlint_version=${{ inputs.gitlint_version }})"

on:
workflow_call:
inputs:
gitlint_version:
description: "Gitlint version to build docker image for"
required: true
type: string
push_to_dockerhub:
description: "Whether to push to dockerhub.com"
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
gitlint_version:
description: "Gitlint version to build docker image for"
type: string
default: "main"
push_to_dockerhub:
description: "Whether to push to dockerhub.com"
required: false
type: boolean
default: false

jobs:
publish_docker:
runs-on: "ubuntu-latest"
steps:
- name: Build and push
uses: docker/build-push-action@v4
with:
push: ${{ inputs.push_to_dockerhub }}
build-args:
- GITLINT_VERSION=${{ inputs.gitlint_version }}
tags: jorisroovers/gitlint:${{ inputs.gitlint_version }}

0 comments on commit 0426bb6

Please sign in to comment.