Execute docker build and push using docker caches.
Build and push
- uses: devmasx/[email protected]
with:
image_name: devmasx/project-name
push: true
Build with multiple options
- uses: devmasx/[email protected]
with:
image_name: devmasx/project-name-web
image_tag: ${{ github.sha }}
file: Dockerfile.web
cache_stage_target: builder
build_params: --build-arg=NPM_TOKEN=${{secrets.NPM_TOKEN}}
push: true
Use your own docker authentication for private repositories Examples:
Azure
- run: az acr login --name myregistry
- uses: devmasx/[email protected]
with:
image_name: devmasx/project-name
Google cloud
- run: gcloud auth configure-docker
- uses: devmasx/[email protected]
with:
image_name: devmasx/project-name
Docker Hub
- run: |
docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}
- uses: devmasx/[email protected]
with:
image_name: devmasx/project-name