Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bozdoz/auto-docker-push
Github Action for auto-tagging and pushing docker image
https://github.com/bozdoz/auto-docker-push
actions docker github-actions
Last synced: 29 days ago
JSON representation
Github Action for auto-tagging and pushing docker image
- Host: GitHub
- URL: https://github.com/bozdoz/auto-docker-push
- Owner: bozdoz
- License: mit
- Created: 2023-01-01T05:46:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T02:11:16.000Z (6 months ago)
- Last Synced: 2024-09-28T07:46:03.203Z (about 2 months ago)
- Topics: actions, docker, github-actions
- Language: C
- Homepage: https://github.com/marketplace/actions/auto-docker-push
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Auto Docker Push
Github Action for automatically tagging and pushing docker images to [Docker Hub](https://hub.docker.com). See example here: https://hub.docker.com/r/bozdoz/docker-push
**Roughly**, it translates a git tag of `v1.2.3` to a docker tag push of both `1.2.3`, and `latest`.
### Getting Started
Follow the template from this very repository:
```yml
name: ReleaseWorkflowon:
push:
tags:
- "*"jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker Push
uses: bozdoz/auto-docker-push@v3
with:
image: ${{ secrets.DOCKER_HUB_IMAGE }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}```
Now, anytime you publish a new tag, it will generate a docker image using that tag.
For example: if you publish `v1.0`, then your image will be pushed under the tags `1.0` and `latest` (note: it strips the leading `v`).
For extra verbose images, if you publish `v1.0.1-2023-04-15`, then your image will be pushed with tags: `1.0.1-2023-04-15`, `1.0.1`, and `latest`.