mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-19 01:56:37 +08:00
ci: Update image tag for GitHub Actions in ci.yml
- Change image tags to use SHORT_SHA instead of github.sha in .github/workflows/ci.yml
This commit is contained in:
parent
75e1a27772
commit
91d5003c61
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -46,6 +46,9 @@ jobs:
|
||||
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
||||
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Add SHORT_SHA env property with commit short sha
|
||||
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
|
||||
|
||||
-
|
||||
name: Build and push latest
|
||||
uses: docker/build-push-action@v4
|
||||
@ -59,4 +62,4 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ppcelery/one-api:${{ github.sha }}
|
||||
tags: ppcelery/one-api:${SHORT_SHA}
|
||||
|
Loading…
Reference in New Issue
Block a user