Skip to content

NRO04/docker-build-push-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI - Docker: Build and Push action

This action makes it esasy to build and push your docker image to your repository on DockerHub.

Set up

To perform this action, you'll need to provide the DockerHub credentials, for security, it is recommended to create secrets on your repository.

Create secrets: To authenticate against Docker Hub it's strongly recommended to create a personal access token as an alternative to your password.

  • Go to Settings > Secrets, then create secrets for your credentials.
  • username
  • password (use access token)
Inputs Decription Required
docker-username Username from dockerhub yes
docker-password Password from dockerhub yes
tag tag for repository yes
name-repository name for repository yes

Usage

name: CI_RO

on: # trigger event
  push: # event push
    branches: [master]

jobs:
  example: # name of job
    name: BUILD DOCKER IMAGE
    runs-on: ubuntu-latest # SO where jobs will execute.
    steps: # sequence tasks to do.
      - name: PULL REPOSITORY
        uses: actions/checkout@v2

      - name: USING ACTION TO BUILD AND PUST :)
        uses: NRO04/docker-build-push-action@v2
        with: #args for action, all of them are required.
          name-repository: ${{ github.repository }} #repository name, specify what the repository will be called on dockerhub.
          tag: v1 #tag for repository
          docker-username: ${{ secrets.DOCKERHUB_USERNAME }} # docker account - username
          docker-password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} # docker password, it should use access token
         

About

Action to build an push docker images to your repository on DockerHub.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •