Skip to content

Commit bf8c081

Browse files
committed
echo sha_short
1 parent 37a9b2b commit bf8c081

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,21 @@ 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"
19+
- name: echo sha
20+
run: |
21+
echo "${{ env.sha_short }}"
1522
- name: Deploy
1623
uses: appleboy/ssh-action@v1.1.0
1724
env:
18-
sha_short: "$(git rev-parse --short '$GITHUB_SHA')"
25+
sha_short: ${{ env.sha_short }}
1926
with:
2027
host: ${{ secrets.DEPLOY_HOST }}
2128
username: ${{ secrets.DEPLOY_USER }}
2229
key: ${{ secrets.DEPLOY_SERVER_SSH_KEY }}
2330
envs: sha_short
2431
script: |
25-
cd ${{ secrets.DEPLOY_PATH }} && git pull
26-
microk8s ctr image import img.tar && rm img.tar
27-
cd infra/helm
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"
32+
echo "$sha_short"

0 commit comments

Comments
 (0)