Skip to content

Commit

Permalink
action
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Dec 30, 2024
1 parent c4a6fa4 commit 823ca97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ jobs:
- uses: actions/checkout@v3
name: Check out code
with:
ref: ${{ github.ref }} # 使用触发事件的分支
ref: ${{ github.event.client_payload.ref }} # 使用触发事件的分支

- name: Version convert
id: convert_version
run: |
curl https://raw.githubusercontent.com/Websoft9/websoft9/${{ github.ref_name }}/docker/apphub/Dockerfile -o Dockerfile
curl https://raw.githubusercontent.com/Websoft9/websoft9/${{ github.event.client_payload.ref_name }}/docker/apphub/Dockerfile -o Dockerfile
library_tag=$(grep 'ARG LIBRARY_VERSION' "Dockerfile" | cut -d'"' -f2 | xargs)
apphub_tag=$(grep 'LABEL version' "Dockerfile" | cut -d'"' -f2 | xargs)
# Determine the channel based on the branch and apphub_tag
if [[ "${GITHUB_REF##*/}" == "dev" ]]; then
if [[ "${{ github.event.client_payload.ref_name }}" == "dev" ]]; then
echo "CHANNEL=dev" >> $GITHUB_ENV
elif [[ "${GITHUB_REF##*/}" == "main" ]]; then
elif [[ "${{ github.event.client_payload.ref_name }}" == "main" ]]; then
if [[ "$apphub_tag" == *"-"* ]]; then
echo "CHANNEL=rc" >> $GITHUB_ENV
else
Expand Down

0 comments on commit 823ca97

Please sign in to comment.