Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d7cdd65ca | |||
| 99ae6a157b | |||
| 3bd0ecaa98 | |||
|
|
146283281b |
@@ -11,17 +11,17 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: 計算版本號
|
- name: 計算版本號
|
||||||
id: version
|
id: version
|
||||||
uses: https://gitea.jsc.idv.tw/jiantw83/calculate-version-action@v${{ vars.CALCULATE_VERSION }}
|
uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }}
|
||||||
with:
|
with:
|
||||||
gitea-server: ${{ gitea.server_url }}
|
gitea-server: ${{ gitea.server_url }}
|
||||||
repository: ${{ gitea.repository }}
|
repository: ${{ gitea.repository }}
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
- name: 發布專案
|
- name: 發布專案
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
|
||||||
with:
|
with:
|
||||||
tag_name: "v${{ steps.version.outputs.VERSION }}"
|
tag_name: "v${{ steps.version.outputs.VERSION }}"
|
||||||
- name: 清理舊版本 (保留最新2個)
|
- name: 清理舊版本 (保留最新2個)
|
||||||
uses: https://gitea.jsc.idv.tw/jiantw83/cleanup-release-action@v${{ vars.CLEANUP_RELEASE_VERSION }}
|
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
|
||||||
with:
|
with:
|
||||||
gitea-server: ${{ gitea.server_url }}
|
gitea-server: ${{ gitea.server_url }}
|
||||||
repository: ${{ gitea.repository }}
|
repository: ${{ gitea.repository }}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ while IFS= read -r version; do
|
|||||||
else
|
else
|
||||||
# 實際刪除
|
# 實際刪除
|
||||||
DELETE_RESPONSE=$(curl -s -w "\nHTTP_STATUS:%{http_code}" \
|
DELETE_RESPONSE=$(curl -s -w "\nHTTP_STATUS:%{http_code}" \
|
||||||
-X DELETE "$GITEA_SERVER/api/v1/packages/$OWNER/container/$PACKAGE_NAME/$VERSION_ID?token=$TOKEN" \
|
-X DELETE "$GITEA_SERVER/api/v1/packages/$OWNER/container/$PACKAGE_NAME/$VERSION_NAME?token=$TOKEN" \
|
||||||
-H "Accept: application/json")
|
-H "Accept: application/json")
|
||||||
|
|
||||||
DELETE_HTTP_STATUS=$(echo "$DELETE_RESPONSE" | grep -o "HTTP_STATUS:[0-9]*" | cut -d: -f2)
|
DELETE_HTTP_STATUS=$(echo "$DELETE_RESPONSE" | grep -o "HTTP_STATUS:[0-9]*" | cut -d: -f2)
|
||||||
|
|||||||
Reference in New Issue
Block a user