Merge pull request '修正 Release Cleanup action 與 Gitea workflow 設定' (#3) from develop into master
CD / Release Tag (push) Failing after 1s
CD / Release Tag (push) Failing after 1s
Reviewed-on: docker-actions/release-cleanup#3 Reviewed-by: 系統管理員 <1+admin@noreply.localhost>
This commit was merged in pull request #3.
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
name: CD
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
jobs:
|
|
||||||
release-tag:
|
|
||||||
name: Release Tag
|
|
||||||
runs-on: ubuntu
|
|
||||||
steps:
|
|
||||||
- name: Release Tag
|
|
||||||
uses: https://gitea.jsc.idv.tw/composite-actions/release-tag@${{ vars.ACTION_VERSION_CALCULATE_VERSION }}
|
|
||||||
with:
|
|
||||||
gitea_token: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
gitea_release: ${{ vars.ACTION_GITEA_RELEASE_VERSION }}
|
|
||||||
version_calculate: ${{ vars.ACTION_VERSION_CALCULATE_VERSION }}
|
|
||||||
release_cleanup: ${{ vars.ACTION_RELEASE_CLEANUP_VERSION }}
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
name: CD
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
release-tag:
|
||||||
|
name: Release Tag
|
||||||
|
runs-on: ubuntu
|
||||||
|
steps:
|
||||||
|
- name: Release Tag
|
||||||
|
uses: https://gitea.jsc.idv.tw/composite-actions/release-tag@${{ vars.ACTION_RELEASE_TAG_VERSION }}
|
||||||
@@ -4,14 +4,14 @@ on:
|
|||||||
branches-ignore:
|
branches-ignore:
|
||||||
- master
|
- master
|
||||||
types: [opened, synchronize]
|
types: [opened, synchronize]
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
issues: write
|
|
||||||
jobs:
|
jobs:
|
||||||
ai-code-review:
|
ai-code-review:
|
||||||
name: Code Review
|
name: Code Review
|
||||||
runs-on: ubuntu
|
runs-on: ubuntu
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
issues: write
|
||||||
steps:
|
steps:
|
||||||
- name: Code Review
|
- name: Code Review
|
||||||
uses: https://gitea.jsc.idv.tw/composite-actions/opencode-code-review@${{ vars.ACTION_AI_CODE_REVIEW_VERSION }}
|
uses: https://gitea.jsc.idv.tw/composite-actions/opencode-code-review@${{ vars.ACTION_AI_CODE_REVIEW_VERSION }}
|
||||||
@@ -4,6 +4,7 @@ FROM alpine:latest
|
|||||||
RUN apk add --no-cache --no-check-certificate bash curl jq
|
RUN apk add --no-cache --no-check-certificate bash curl jq
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
name: 'Docker Action Template'
|
name: 'Release Cleanup'
|
||||||
description: 'Docker Action 範本'
|
description: 'Release Cleanup'
|
||||||
author: 'Jeffery'
|
author: 'Jeffery'
|
||||||
inputs:
|
inputs:
|
||||||
keep_count:
|
keep_count:
|
||||||
@@ -12,5 +12,5 @@ runs:
|
|||||||
env:
|
env:
|
||||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||||
GITEA_TOKEN: ${{ secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ gitea.token }}
|
||||||
KEEP_COUNT: ${{ inputs.keep_count }}
|
KEEP_COUNT: ${{ inputs.keep_count }}
|
||||||
+5
-5
@@ -79,17 +79,17 @@ require_value "GITEA_REPOSITORY" "$GITEA_REPOSITORY"
|
|||||||
require_value "KEEP_COUNT" "$KEEP_COUNT"
|
require_value "KEEP_COUNT" "$KEEP_COUNT"
|
||||||
require_integer "KEEP_COUNT" "$KEEP_COUNT"
|
require_integer "KEEP_COUNT" "$KEEP_COUNT"
|
||||||
|
|
||||||
if is_empty_or_null "${RUNNER_TOKEN:-}"; then
|
if is_empty_or_null "${GITEA_TOKEN:-}"; then
|
||||||
warn "RUNNER_TOKEN is empty; release API calls will be anonymous"
|
warn "GITEA_TOKEN is empty; release API calls will be anonymous"
|
||||||
else
|
else
|
||||||
info "RUNNER_TOKEN=[redacted]"
|
info "GITEA_TOKEN=[redacted]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
release_api_url="$GITEA_SERVER_URL/api/v1/repos/$GITEA_REPOSITORY/releases"
|
release_api_url="$GITEA_SERVER_URL/api/v1/repos/$GITEA_REPOSITORY/releases"
|
||||||
auth_header=()
|
auth_header=()
|
||||||
|
|
||||||
if ! is_empty_or_null "${RUNNER_TOKEN:-}"; then
|
if ! is_empty_or_null "${GITEA_TOKEN:-}"; then
|
||||||
auth_header=(-H "Authorization: token $RUNNER_TOKEN")
|
auth_header=(-H "Authorization: token $GITEA_TOKEN")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
section "取得成品資訊"
|
section "取得成品資訊"
|
||||||
|
|||||||
Reference in New Issue
Block a user