Skip to content

Commit 10c9a56

Browse files
committed
update ci config
1 parent 747ac4d commit 10c9a56

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- '.github/workflows/docker*'
99
branches:
1010
- main
11-
tags:
11+
tags:
1212
- v[0-9]*
1313

1414
env:

.github/workflows/oss-upload.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: OSS Upload
22

33
on:
44
push:
5-
paths:
6-
- index.yaml
7-
branches:
8-
- gh-pages
5+
tags:
6+
- kafka*
97

108
jobs:
119
release:
@@ -14,6 +12,8 @@ jobs:
1412
-
1513
name: Checkout
1614
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
1717
-
1818
name: Upload to OSS
1919
if: ${{ vars.OSS_MIRROR_ENABLED == 'true' }}
@@ -32,9 +32,10 @@ jobs:
3232
curl -o $ALIOSS -L $DL_URL_OSS
3333
chmod a+rx $ALIOSS
3434
$ALIOSS config -e $OSS_EP -i $OSS_KEY_ID -k $OSS_KEY_SECRET
35-
head -n50 index.yaml
36-
if head -n50 index.yaml | grep -E '^apiVersion:' ; then
37-
sed 's%- https://github\.com/sir5kong%- https://'${MIRROR_HOST}'/github/sir5kong%g' index.yaml > /tmp/index.yaml
35+
git show gh-pages:index.yaml > /tmp/index.yaml
36+
head -n50 /tmp/index.yaml
37+
if head -n50 /tmp/index.yaml | grep -E '^apiVersion:' ; then
38+
sed -i 's%- https://github\.com/sir5kong%- https://'${MIRROR_HOST}'/github/sir5kong%g' /tmp/index.yaml
3839
$ALIOSS cp -f /tmp/index.yaml \
3940
"oss://${OSS_BUCKET}/kafka/index.yaml" \
4041
--meta content-type:text/yaml

0 commit comments

Comments
 (0)