GitHub Action
docker-build-action
v5
Latest version
Hi! We're Dan and Jay. We're a two person team with a passion for open source products. We created Server Side Up to help share what we learn.
- π Blog - get the latest guides and free courses on all things web/mobile development.
- π Community - get friendly help from our community members.
- π€΅ββοΈ Get Professional Help - get guaranteed responses within next business day.
- π» GitHub - check out our other open source projects
- π« Newsletter - skip the algorithms and get quality content right to your inbox
- π₯ Twitter - you can also follow Dan and Jay
- β€οΈ Sponsor Us - please consider sponsoring us so we can create more helpful resources
All of our software is free an open to the world. None of this can be brought to you without the financial backing of our sponsors.
Β Β Β ΒThis is a GitHub Action intended to simplify the process for building automated Docker images with GitHub Actions.
- β Stupid simple to use
- π Customize your docker image names/tags by easily passing what you want it to be
- π€ Multi-arch support
- π Context aware (great if you have a Docker file in a different part of your repo)
Here is an example workflow:
name: Docker Publish (Production Images)
on:
push:
jobs:
docker-publish:
runs-on: ubuntu-22.04
steps:
- name: docker-build-action
uses: serversideup/github-action-docker-build@v3
with:
tags: serversideup/financial-freedom:latest
registry-username: ${{ secrets.DOCKER_HUB_USERNAME }}
registry-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
platforms: "linux/amd64,linux/arm/v7,linux/arm64/v8"
π Input Name | π Description | π Required | π Default |
---|---|---|---|
tags | Enter the tag you would like to name your image with. (example: myorg/myapp:production ) |
||
registry-username | Enter the username to authenticate with your registry. | ||
registry-token | Enter the token or password to authenticate with your registry. (an access token is highly recommended) | ||
registry | Choose which container image repository to upload to. See all options. | Docker Hub | |
context | The relative path to the Dockerfile. | . |
|
dockerfile | Filename of the Dockerfile within the context that you set. | {context}/Dockerfile |
|
platforms | Comma separated list of platforms. | linux/amd64 |
|
target | The target build stage to build. | '' |
Always use encrypted secrets when passing sensitive information. Learn more here β
If you find a security vulnerability, please let us know as soon as possible.