ci: revert change

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
(cherry picked from commit 6a3153a7ecd6b1f8b36ca2a58f62fec8fefddd26)
This commit is contained in:
Yi-Ya Chen 2025-02-21 10:49:26 +08:00 committed by Mergify
parent 2ec37d81d9
commit 9d0bb6e1f4

View File

@ -1,14 +1,9 @@
name: Build and Release Extension Charts name: Build and Release Extension Charts on Release
on: on:
workflow_dispatch: workflow_dispatch:
release: release:
types: [released] types: [released]
pull_request:
branches:
- "release-harvester-v*"
types:
- merged
defaults: defaults:
run: run:
@ -25,34 +20,9 @@ jobs:
- name: Run tests - name: Run tests
uses: ./.github/actions/lint uses: ./.github/actions/lint
build-extension-charts: build-extension-charts:
needs: needs:
- lint - lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Determine target branch
id: set_target
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
echo "TARGET_BRANCH=gh-pages" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.merged }}" == "true" ]]; then
VERSION=$(echo "${{ github.ref }}" | sed -n 's/refs\/heads\/release-harvester-v\(.*\)/v\1-head/p')
if [[ -n "$VERSION" ]]; then
echo "TARGET_BRANCH=$VERSION" >> $GITHUB_ENV
else
echo "Error: Could not determine target branch."
exit 1
fi
else
echo "Skipping build. No matching condition."
exit 0
fi
- name: Build and push extension charts
if: env.TARGET_BRANCH != ''
uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master
permissions: permissions:
actions: write actions: write
@ -60,5 +30,5 @@ jobs:
deployments: write deployments: write
pages: write pages: write
with: with:
target_branch: ${{ env.TARGET_BRANCH }} target_branch: gh-pages
tagged_release: ${{ github.ref_name }} tagged_release: ${{ github.ref_name }}