mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-19 01:56:37 +08:00
chore: Refactor code and update GitHub workflow
- Remove comment section from the Footer component in Footer.js - Add environment variable `SHORT_SHA` to store the first 8 characters of the commit SHA in ci.yml file - Remove the addition of `SHORT_SHA` to the `GITHUB_ENV` file in ci.yml file
This commit is contained in:
parent
91d5003c61
commit
8d270c8c9a
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -5,6 +5,9 @@ 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
|
||||||
@ -46,8 +49,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
|
||||||
@ -62,4 +65,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ppcelery/one-api:${SHORT_SHA}
|
tags: ppcelery/one-api:${{ env.SHORT_SHA }}
|
||||||
|
@ -43,14 +43,6 @@ const Footer = () => {
|
|||||||
>
|
>
|
||||||
{systemName} {process.env.REACT_APP_VERSION}{' '}
|
{systemName} {process.env.REACT_APP_VERSION}{' '}
|
||||||
</a>
|
</a>
|
||||||
由{' '}
|
|
||||||
<a href='https://github.com/songquanpeng' target='_blank'>
|
|
||||||
JustSong
|
|
||||||
</a>{' '}
|
|
||||||
构建,源代码遵循{' '}
|
|
||||||
<a href='https://opensource.org/licenses/mit-license.php'>
|
|
||||||
MIT 协议
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Container>
|
</Container>
|
||||||
|
Loading…
Reference in New Issue
Block a user