Skip to content

Commit

Permalink
ci: select environment for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Jul 29, 2024
1 parent ae2ca17 commit 490de28
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ name: Publish Docker image

on:
workflow_dispatch:
inputs:
environment:
required: true
type: choice
options:
- aelf-docs-dev
- aefinder-docs-dev
- tomorrowdao-docs-dev

jobs:
build:
name: Build and Push Docker image to Docker Hub
name: Build and Push Docker image ${{inputs.environment}} to Docker Hub
runs-on: ubuntu-latest
strategy:
matrix:
environment: [aelf-docs-dev, aefinder-docs-dev, tomorrowdao-docs-dev]
environment:
name: ${{ matrix.environment }}
name: ${{ inputs.environment }}
permissions:
contents: read
steps:
Expand Down Expand Up @@ -57,7 +62,7 @@ jobs:
with:
images: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}
tags: |
type=raw,value=${{ matrix.environment }}-{{date 'YYYYMMDD-hhmmss' tz='Asia/Tokyo'}}
type=raw,value=${{ inputs.environment }}-{{date 'YYYYMMDD-hhmmss' tz='Asia/Tokyo'}}
- name: Build and push Docker image
id: push
Expand All @@ -80,7 +85,7 @@ jobs:
workflow_id: 'docs-cms.yaml',
ref: 'main',
inputs: {
appName: '${{ matrix.environment }}',
appName: '${{ inputs.environment }}',
commit_sha: '${{ steps.meta.outputs.version }}',
}
})

0 comments on commit 490de28

Please sign in to comment.