Skip to content

Commit a9ce0d4

Browse files
committed
try to pass sha_short differently
1 parent 8514652 commit a9ce0d4

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313
environment: ${{ inputs.environment }}
1414
steps:
15-
- name: Declare image's tag
16-
shell: bash
17-
run: |
18-
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
1915
- name: Deploy
2016
uses: appleboy/ssh-action@v1.1.0
17+
env:
18+
sha_short: $(git rev-parse --short "$GITHUB_SHA")
2119
with:
2220
host: ${{ secrets.DEPLOY_HOST }}
2321
username: ${{ secrets.DEPLOY_USER }}
2422
key: ${{ secrets.DEPLOY_SERVER_SSH_KEY }}
23+
envs: sha_short
2524
script: |
2625
cd ${{ secrets.DEPLOY_PATH }} && git pull
27-
echo "${{ env.sha_short }}"
2826
microk8s ctr image import img.tar && rm img.tar
2927
cd infra/helm
30-
microk8s helm upgrade -f ./qmra/${{ inputs.environment }}.values.yaml qmra ./qmra -n qmra --set app_secret_key.value=${{ secrets.APP_SECRET_KEY }},image.tag=${{ env.sha_short }}
28+
microk8s helm upgrade -f ./qmra/${{ inputs.environment }}.values.yaml qmra ./qmra -n qmra --set app_secret_key.value=${{ secrets.APP_SECRET_KEY }},image.tag=$sha_short

0 commit comments

Comments
 (0)