mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-20 02:26:38 +08:00
ci: Refactor GitHub workflow and increase code efficiency
- Remove commented out code for `SHORT_SHA` in `.github/workflows/ci.yml` - Add `SHORT_SHA` environment property with commit short sha in `.github/workflows/ci.yml`
This commit is contained in:
parent
8b477d896d
commit
d0c0b9b650
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -5,9 +5,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
|
|
||||||
env:
|
|
||||||
SHORT_SHA: "${GITHUB_SHA} | cut -c1-8`"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -49,8 +46,8 @@ jobs:
|
|||||||
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
||||||
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
||||||
|
|
||||||
# - name: Add SHORT_SHA env property with commit short sha
|
- name: Add SHORT_SHA env property with commit short sha
|
||||||
# run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
|
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Build and push latest
|
name: Build and push latest
|
||||||
|
Loading…
Reference in New Issue
Block a user