This commit is contained in:
1 parent
51ebf4a418
commit
b8cbdf059d
1 file changed
+16
-1
@@ -24,6 +24,11 @@ jobs:
|
||||
--request POST \
|
||||
--upload-file "dist/coturn-${version}.tgz" \
|
||||
https://code.brunner.ninja/api/packages/feedc0de/helm/api/charts
|
||||
- name: Check that this is still current main
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
run: |
|
||||
git fetch --no-tags origin main
|
||||
test "$(git rev-parse FETCH_HEAD)" = "${GITEA_SHA}"
|
||||
- name: Check out GitOps
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
uses: actions/checkout@v4
|
||||
@@ -42,4 +47,14 @@ jobs:
|
||||
git add bootstrap/coturn.yaml
|
||||
if git diff --cached --quiet; then exit 0; fi
|
||||
git commit -m "Deploy coturn chart ${CHART_VERSION}"
|
||||
git push origin HEAD:main
|
||||
for attempt in 1 2 3; do
|
||||
if git push origin HEAD:main; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "${attempt}" = 3 ]; then
|
||||
echo "GitOps promotion failed after three attempts" >&2
|
||||
exit 1
|
||||
fi
|
||||
git fetch origin main
|
||||
git rebase origin/main
|
||||
done
|
||||
Reference in new issue
Block a user