mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 13:38:30 +00:00
fix release sync
This commit is contained in:
6
.github/workflows/release-mirror.yml
vendored
6
.github/workflows/release-mirror.yml
vendored
@@ -270,7 +270,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
test -n "$GITLAB_PAT" || { echo 'GITLAB_PAT is not configured' >&2; exit 0; }
|
test -n "$GITLAB_PAT" || { echo 'GITLAB_PAT is not configured' >&2; exit 0; }
|
||||||
|
|
||||||
project_id="${GITLAB_PROJECT//\//%2F}"
|
project_id="${GITLAB_PROJECT//\//%2F}"
|
||||||
api="https://gitlab.com/api/v4/projects/${project_id}"
|
api="https://gitlab.com/api/v4/projects/${project_id}"
|
||||||
title=$(jq -r '.name // .tag_name' release.json)
|
title=$(jq -r '.name // .tag_name' release.json)
|
||||||
@@ -284,7 +284,7 @@ jobs:
|
|||||||
echo "GitLab release ${TAG} already exists; skipping"
|
echo "GitLab release ${TAG} already exists; skipping"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Creating release on GitLab..."
|
echo "Creating release on GitLab..."
|
||||||
curl -fsSL -X POST -H "PRIVATE-TOKEN: $GITLAB_PAT" \
|
curl -fsSL -X POST -H "PRIVATE-TOKEN: $GITLAB_PAT" \
|
||||||
-H 'Content-Type: application/json' --data "$payload" "${api}/releases" || true
|
-H 'Content-Type: application/json' --data "$payload" "${api}/releases" || true
|
||||||
|
|||||||
Reference in New Issue
Block a user