Skip to content

Github Action for docker image builds with support for private npm registry & ECR repositories.

Notifications You must be signed in to change notification settings

TheCloudConnectors/action-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker to ECR

This action build a docker image using docker in docker then publish to ECR registries (primary and secondary).

Example usage

name: Build docker image

on:
  push:
    branches:
        - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Get tag name
      id: tag
      run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
    - uses: TheCloudConnectors/action-docker@master
      env:
        NPM_REGISTRY: ${{ secrets.NPM_REGISTRY }}
        NPMRC: ${{ secrets.NPMRC }}
        AWS_REGION: us-east-2
        REGISTRY: 123456789
        SECONDARY_REGISTRY: 987654321
        REPOSITORY: example
        DOCKERFILE: Dockerfile
        CONTEXT: ./
        TAG: ${{ steps.tag.outputs.SOURCE_TAG }}

Publish

Tag new version and publish release

git ci -am "v1"
git tag -a -m "Release notes" v1
git push --follow-tags

About

Github Action for docker image builds with support for private npm registry & ECR repositories.

Resources

Stars

Watchers

Forks

Packages

No packages published