Releases: punga78/gitea-docker-build-and-push-version
Releases · punga78/gitea-docker-build-and-push-version
First release
Build and Push Docker Image Action
This GitHub Action builds and pushes a Docker image to a Docker registry. It uses Docker to build the image from a specified context directory, tags the image with a version and the latest tag, and pushes both tags to the Docker registry.
Inputs
username
Required The username for the Docker registry.
password
Required The password for the Docker registry.
path
Optional The path to the Docker context directory. Default is .
.
registry
Required The Docker registry URL.
owner
Required The owner of the Docker repository.
Example Usage
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build and Push Docker Image
uses: Punga78/gitea-docker-build-and-push-version
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: 'gitea.com'
owner: 'Punga78'
path: '.'
Details
This action performs the following steps:
- Retrieves the input parameters.
- Reads the
package.json
and optionallybuild-info.json
from the specified context path. - Constructs the Docker image name and tags.
- Builds the Docker image using
docker buildx build
. - Tags the image with both the version and latest tags.
- Pushes both tags to the Docker registry.
Full Changelog: https://github.com/punga78/gitea-docker-build-and-push-version/commits/v1.0.0