Skip to content

GHA: publish-docker workflow #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}