ci: re-clone in commit-back step
All checks were successful
Build & Deploy Go API / build (push) Successful in 15s
All checks were successful
Build & Deploy Go API / build (push) Successful in 15s
This commit is contained in:
@@ -44,7 +44,12 @@ jobs:
|
||||
|
||||
- name: Update image tag in values.yaml (commit-back GitOps)
|
||||
run: |
|
||||
cd /root/.cache/demo-go-api
|
||||
set -e
|
||||
WORK=/root/.cache/demo-go-api
|
||||
rm -rf "$WORK"
|
||||
mkdir -p "$WORK"
|
||||
cd "$WORK"
|
||||
git clone https://joe:${GITEA_TOKEN}@git.cjjhc.top/joe/demo-go-api.git .
|
||||
SHORT=${GITHUB_SHA::8}
|
||||
sed -i "s/^ tag:.*/ tag: \"${SHORT}\"/" deploy/helm/values.yaml
|
||||
git config user.email "ci@local"
|
||||
@@ -55,3 +60,4 @@ jobs:
|
||||
echo "✓ Pushed tag ${SHORT}"
|
||||
env:
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user