rtrm HF Staff commited on
Commit
4491086
·
unverified ·
1 Parent(s): 6a6b5ba

fix(github): use sha as image version (#1103)

Browse files
Files changed (1) hide show
  1. .github/workflows/deploy-prod.yml +3 -3
.github/workflows/deploy-prod.yml CHANGED
@@ -57,14 +57,14 @@ jobs:
57
  runs-on: ubuntu-latest
58
  needs: ["build-and-publish-huggingchat-image"]
59
  steps:
60
- - name: Set GITHUB_SHA_SHORT
61
- run: echo "GITHUB_SHA_SHORT=${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}" >> $GITHUB_ENV
62
 
63
  - name: Gen values
64
  run: |
65
  VALUES=$(cat <<-END
66
  image:
67
- tag: "${{ env.GITHUB_SHA_SHORT }}"
68
  END
69
  )
70
  echo "VALUES=$(echo "$VALUES" | yq -o=json | jq tostring)" >> $GITHUB_ENV
 
57
  runs-on: ubuntu-latest
58
  needs: ["build-and-publish-huggingchat-image"]
59
  steps:
60
+ - name: Inject slug/short variables
61
+ uses: rlespinasse/github-slug-action@v4.5.0
62
 
63
  - name: Gen values
64
  run: |
65
  VALUES=$(cat <<-END
66
  image:
67
+ tag: "sha-${{ env.GITHUB_SHA_SHORT }}"
68
  END
69
  )
70
  echo "VALUES=$(echo "$VALUES" | yq -o=json | jq tostring)" >> $GITHUB_ENV