next-l/enju_leaf

View on GitHub
.github/workflows/docker-image.yml

Summary

Maintainability
Test Coverage
name: Docker Image CI

on:
  push:
    branches: [ main, 1.4 ]
    tags:
    - 'v*'

jobs:

  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - uses: docker/metadata-action@v4
      id: meta
      with:
        images: ghcr.io/next-l/enju_leaf
        tags: |
          type=ref,event=branch
          type=ref,event=pr
          type=semver,pattern={{version}}
          type=semver,pattern={{major}}.{{minor}}
    - name: Docker Login
      uses: docker/login-action@v2
      with:
        registry: ghcr.io
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
    - name: Build and push Docker images
      uses: docker/build-push-action@v3
      with:
        push: true
        tags: ${{ steps.meta.outputs.tags }}
        labels: ${{ steps.meta.outputs.labels }}