Skip to content

attentiontech/docker-image-name-action

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-image-name-action

GitHub Super-Linter CI

Generates Unique Docker Images per Pull Request

Usage

name: Build Docker Image

on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main

jobs:
  unique-image-name:
    runs-on: ubuntu-latest

    steps:
      - name: Generate Docker Image Name
        id: unique-image-name
        uses: attentiontech/docker-image-name-action@v1
        with:
          baseName: myregistry/myimage

      - name: 'Print Output: imageName'
        run: echo "${{ steps.unique-image-name.outputs.imageName }}"
      - name: 'Print Output: tag'
        run: echo "${{ steps.unique-image-name.outputs.tag }}"

License

MIT