refactor: extract shared CI steps to deploy_call.yaml reusable workflow
This commit is contained in:
@@ -8,6 +8,7 @@ on:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: "contains(github.ref_name, 'beta') || contains(github.ref_name, 'test')"
|
||||
uses: ./.gitea/workflows/deploy_call.yaml
|
||||
with:
|
||||
prerelease: true
|
||||
|
||||
@@ -66,11 +66,8 @@ jobs:
|
||||
|
||||
- name: Create Release and upload assets
|
||||
env:
|
||||
# PINDAHKAN TOKEN KE SINI
|
||||
TOKEN: ${{ secrets.BUILD_TOKEN }}
|
||||
run: |
|
||||
# Sekarang $TOKEN sudah bisa dipakai di Bash
|
||||
echo "--- Diagnostic ---"
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "Value: [EMPTY]"
|
||||
exit 1
|
||||
@@ -82,7 +79,6 @@ jobs:
|
||||
TAG="${{ gitea.ref_name }}"
|
||||
API="${{ gitea.server_url }}/api/v1"
|
||||
|
||||
# 1. Create Release
|
||||
JSON_BODY=$(printf '{"tag_name":"%s","name":"%s","body":"Release %s","draft":false,"prerelease":%s}' "$TAG" "$TAG" "$TAG" "${{ inputs.prerelease }}")
|
||||
|
||||
RELEASE_RESP=$(curl -s -X POST \
|
||||
|
||||
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: "!contains(github.ref_name, 'beta') && !contains(github.ref_name, 'test')"
|
||||
uses: ./.gitea/workflows/deploy_call.yaml
|
||||
with:
|
||||
prerelease: false
|
||||
|
||||
Reference in New Issue
Block a user