Skip to content

Commit

Permalink
[WIP] Add publish dockerhub image workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
indiebrain committed Dec 20, 2023
1 parent 0be04ae commit 91e9e65
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/dockerhub-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docker Hub Image

on:
workflow_dispatch:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: powerhome/redis-operator
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=,suffix=,format=long
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

0 comments on commit 91e9e65

Please sign in to comment.