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