Skip to content

Commit

Permalink
fix: env for release-flask
Browse files Browse the repository at this point in the history
  • Loading branch information
T0ha committed Oct 23, 2024
1 parent f442bd3 commit b5f7317
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/release-flask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ on:
app-name:
type: string
required: true
app-vsn:
type: string
required: true
service-name:
type: string
required: false
default: ${{ inputs.app-name }}
docker-org:
type: string
required: false
default: heathmont

secrets:
HEX_ORGANIZATION_COINGAMING_KEY:
Expand Down Expand Up @@ -73,6 +80,8 @@ jobs:
env:
MIX_ENV: ${{ inputs.mix-env }}
HEX_API_KEY: ${{ secrets.HEX_ORGANIZATION_COINGAMING_KEY }}
APP_NAME: ${{ inputs.app-name }}
APP_VSN: ${{ inputs.app-vsn }}

steps:
- name: Prepare repo and env
Expand Down Expand Up @@ -118,7 +127,7 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}

- name: Prepare variables for push
run: echo "IMAGE=$DOCKER_ORG/$APP_NAME:v${APP_VSN}-${GITHUB_SHA::9}" >> $GITHUB_ENV
run: echo "IMAGE=${{ inputs.docker-org }}/$APP_NAME:v${APP_VSN}-${GITHUB_SHA::9}" >> $GITHUB_ENV

- name: Build and Push Docker Image
run: |
Expand All @@ -129,13 +138,13 @@ jobs:
--file ci.Dockerfile .
docker push ${{ env.IMAGE }}
- name: Deploy to stacks
run: |
git clone git@github.com:coingaming/${{ inputs.stacks-repo }}
cd ${{ inputs.stacks-repo }}
git checkout ${{ inputs.stacks-branch-name }}
# - name: Deploy to stacks
# run: |
# git clone git@github.com:coingaming/${{ inputs.stacks-repo }}
# cd ${{ inputs.stacks-repo }}
# git checkout ${{ inputs.stacks-branch-name }}
scripts/update-image ${{ inputs.stacks-name }} ${{inputs.service-name }} ${{ env.IMAGE }}
# scripts/update-image ${{ inputs.stacks-name }} ${{inputs.service-name }} ${{ env.IMAGE }}
git commit -am "upgraded ${{inputs.service-name }} service with ${{ env.IMMAGE }}"
git push origin refs/heads/${{ inputs.stacks-branch-name }}:refs/heads/${{ inputs.stacks-branch-name }}
# git commit -am "upgraded ${{inputs.service-name }} service with ${{ env.IMMAGE }}"
# git push origin refs/heads/${{ inputs.stacks-branch-name }}:refs/heads/${{ inputs.stacks-branch-name }}

0 comments on commit b5f7317

Please sign in to comment.