Skip to content

Commit

Permalink
ci: use inputs for deployment env
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed Dec 10, 2024
1 parent fd4bb56 commit cc12199
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
description: 'Tag to build'
required: true
type: string
deployment-env:
description: 'Deployment environment'
type: choice
options:
- staging
- production

concurrency:
group: ${{ github.workflow }}
Expand Down Expand Up @@ -55,5 +61,7 @@ jobs:
echo "tag=$tag" >> $GITHUB_ENV
- name: Build Docker image
env:
DEPLOYMENT_ENV: ${{ inputs.deployment_env }}
run: |
./packages/docker/script/build.sh -r ${{ env.registry }} -t ${{ env.tag }} -a ${{ env.app }} ${{ env.force_build }}
8 changes: 3 additions & 5 deletions .github/workflows/release-deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ jobs:
permissions:
contents: write
packages: write
env:
DEPLOYMENT_ENV: staging
with:
tag: ${{ needs.release.outputs.version }}-beta
deployment-env: staging

build-prod:
needs: release
Expand All @@ -36,7 +35,6 @@ jobs:
permissions:
contents: write
packages: write
env:
DEPLOYMENT_ENV: production
with:
tag: ${{ needs.release.outputs.version }}
tag: ${{ needs.release.outputs.version }}
deployment-env: production

0 comments on commit cc12199

Please sign in to comment.