summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoris Roovers <joris.roovers@gmail.com>2023-02-17 09:36:19 +0000
committerGitHub <noreply@github.com>2023-02-17 09:36:19 +0000
commit0426bb6915be1767ddb8ef8518312cb5efd2eb22 (patch)
treeba4300020dd3e9fb6c88331d05169bf294fdccb7
parent8ed865c99875537bb97cc3eb939072342c03ff5b (diff)
GHA: publish-docker workflow (#451)
This allows for the gitlint docker image to be build and pushed on-demand.
-rw-r--r--.github/workflows/publish-docker.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml
new file mode 100644
index 0000000..2ed6090
--- /dev/null
+++ b/.github/workflows/publish-docker.yml
@@ -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 }} \ No newline at end of file