name: Build <%= @app_name %> starter DEV

on:
  workflow_dispatch:
  push:
    branches: ["develop"]

jobs:
  build:
    name: Build and test
    runs-on: ubuntu-latest
    concurrency:
      group: ci-${{ github.ref }}
      cancel-in-progress: true

    steps:
      - uses: actions/checkout@v3

      - name: Build & push Docker image 🐳
        uses: mr-smithers-excellent/docker-build-push@v5
        with:
          image: <%= String.downcase(@app_name) %>
          tags: dev
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
          buildArgs: MIX_ENV=dev
        env:
          MIX_ENV: dev
