ci: deploy release tags by v*-tag (dev stays sha-based)
Build & Push Docker Image / build (push) Successful in 2m58s
Build & Push Docker Image / build (push) Successful in 2m58s
This commit is contained in:
@@ -52,12 +52,17 @@ jobs:
|
||||
GITEA_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
SHA=$(git rev-parse --short HEAD)
|
||||
if [ "${{ gitea.ref_type }}" = "tag" ]; then
|
||||
NEWTAG="${{ gitea.ref_name }}"
|
||||
else
|
||||
NEWTAG="sha-${SHA}"
|
||||
fi
|
||||
git clone "https://admin:${GITEA_TOKEN}@git.kubebase.de/admin/apps.git" /tmp/apps
|
||||
cd /tmp/apps
|
||||
cd apps/system/toolrate/overlays/k3s
|
||||
sed -i "s|newTag: .*|newTag: sha-${SHA}|" kustomization.yaml
|
||||
sed -i "s|newTag: .*|newTag: ${NEWTAG}|" kustomization.yaml
|
||||
git config user.name "Gitea Actions"
|
||||
git config user.email "actions@git.kubebase.de"
|
||||
git add -A
|
||||
git diff --cached --quiet || git commit -m "chore: update toolrate image to sha-${SHA}"
|
||||
git diff --cached --quiet || git commit -m "chore: update toolrate image to ${NEWTAG}"
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user