Skip to content

EuphoricSystems/docker-promote-image

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

Repository files navigation

Docker Promote Image

About

GitHub Action to promote or re-tag Docker image with other tags.

  • Same Repository
  • Different Repositories
  • Multiple Different Repositories
  • Same Repository (Private)
  • Different Repositories (Private)
  • Multiple Different Repositories (Private)

Examples

Same repository

name: 'promote image'
on: 
  workflow_dispatch

jobs:
  promote-image: # make sure the action works on a clean machine without building
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: docker/[email protected]
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - uses: euhporicsystems/[email protected]
        with:
         src: docker.io/node:16
         destinations: |
          docker.io/u4ic/test-node:node-16
          docker.io/u4ic/test-node:latest
          docker.io/u4ic/test-node2:latest

Different/Multiple Repositories

name: 'promote image'
on: 
  workflow_dispatch

jobs:
  promote-image: # make sure the action works on a clean machine without building
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      
      - uses: docker/[email protected]
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      
      - uses: docker/[email protected]
        name: Login to GitHub Container Registry        
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      
      - uses: euhporicsystems/[email protected]
        with:
         src: docker.io/node:16
         destinations: |
          ghcr.io/u4ic/test-node:node-16
          ghcr.io/u4ic/test-node:latest
          docker.io/u4ic/test-node2:latest