Skip to content

Commit 469fa8e

Browse files
LoneRifleclaude
andcommitted
build(ci): drop github-slug-action, compute short SHA inline
Replace the third-party rlespinasse/github-slug-action with inline shell to compute the 8-char short SHA, removing a CI supply-chain dependency. build-image and deploy-prod use ${GITHUB_SHA:0:8} (the auto-injected default env var, no template interpolation). deploy-dev keeps the shell approach off github.event.pull_request.head.sha, since on pull_request triggers GITHUB_SHA is the merge commit, not the PR head. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f98711a commit 469fa8e

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/build-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
password: ${{ secrets.GITHUB_TOKEN }}
6464

6565
- name: Inject slug/short variables
66-
uses: rlespinasse/github-slug-action@797d68864753cbceedc271349d402da4590e6302 # v4.5.0
66+
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
6767

6868
- name: Build and Publish Docker Image with DB
6969
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
@@ -124,7 +124,7 @@ jobs:
124124
password: ${{ secrets.GITHUB_TOKEN }}
125125

126126
- name: Inject slug/short variables
127-
uses: rlespinasse/github-slug-action@797d68864753cbceedc271349d402da4590e6302 # v4.5.0
127+
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
128128

129129
- name: Build and Publish Docker Image without DB
130130
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5

.github/workflows/deploy-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
password: ${{ secrets.DOCKERHUB_PASSWORD }}
2828

2929
- name: Inject slug/short variables
30-
uses: rlespinasse/github-slug-action@v4.5.0
30+
run: echo "GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT=$(echo ${{ github.event.pull_request.head.sha }} | cut -c 1-8)" >> $GITHUB_ENV
3131

3232
- name: Set GITHUB_SHA_SHORT from PR
3333
if: env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT != null

.github/workflows/deploy-prod.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
3131

3232
- name: Inject slug/short variables
33-
uses: rlespinasse/github-slug-action@797d68864753cbceedc271349d402da4590e6302 # v4.5.0
33+
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
3434

3535
- name: Build and Publish HuggingChat image
3636
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
@@ -54,7 +54,7 @@ jobs:
5454
needs: ["build-and-publish-huggingchat-image"]
5555
steps:
5656
- name: Inject slug/short variables
57-
uses: rlespinasse/github-slug-action@797d68864753cbceedc271349d402da4590e6302 # v4.5.0
57+
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
5858

5959
- name: Gen values
6060
run: |

0 commit comments

Comments
 (0)