Table of Contents
Docker Push Action
A composite action to tag and push Docker images based on git context.
Tag Logic
| Event |
Condition |
Tags Pushed |
push |
Tag v*.*.* |
latest, <version> (without v prefix) |
push |
Branch main |
latest |
push |
Branch develop |
develop |
pull_request |
Any |
pr<number> |
Usage
Inputs
| Input |
Required |
Description |
registry |
Yes |
Docker registry URL |
registry-username |
Yes |
Docker registry username |
registry-password |
Yes |
Docker registry password |
image-name |
Yes |
Full image name (e.g., phundrak/my-app) |
local-image |
Yes |
Local image to tag and push |
event-name |
Yes |
Pass ${{ github.event_name }} |
ref |
Yes |
Pass ${{ github.ref }} |
ref-type |
Yes |
Pass ${{ github.ref_type }} |
ref-name |
Yes |
Pass ${{ github.ref_name }} |
pr-number |
No |
Pass ${{ github.event.pull_request.number }} |
Outputs
| Output |
Description |
pushed-tags |
Space-separated list of tags that were pushed |