update workflow
This commit is contained in:
22
.github/workflows/publish.yml
vendored
22
.github/workflows/publish.yml
vendored
@@ -3,18 +3,20 @@ name: Publish Docker to GHCR
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: "Target environment"
|
||||
stack_env:
|
||||
description: "stack env"
|
||||
required: true
|
||||
type: choice
|
||||
default: "development"
|
||||
default: "dev"
|
||||
options:
|
||||
- development
|
||||
- production
|
||||
- staging
|
||||
- dev
|
||||
- prod
|
||||
- stg
|
||||
tag:
|
||||
description: "Image tag (e.g. v1.0.0)"
|
||||
description: "Image tag (e.g. 1.0.0)"
|
||||
required: true
|
||||
default: "1.0.0"
|
||||
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
@@ -22,7 +24,7 @@ env:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Build & Push to GHCR (${{ github.event.inputs.environment }})
|
||||
name: Build & Push to GHCR ${{ github.repository }}:${{ github.event.inputs.stack_env }}-${{ github.event.inputs.tag }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -59,8 +61,8 @@ jobs:
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=${{ github.event.inputs.environment }}-${{ github.event.inputs.tag }}
|
||||
type=raw,value=${{ github.event.inputs.environment }}-latest
|
||||
type=raw,value=${{ github.event.inputs.stack_env }}-${{ github.event.inputs.tag }}
|
||||
type=raw,value=${{ github.event.inputs.stack_env }}-latest
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
|
||||
Reference in New Issue
Block a user