refac
This commit is contained in:
1 parent
08f64f7908
commit
7c3802a55e
1 file changed
+9
-15
@@ -235,25 +235,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [merge]
|
needs: [merge]
|
||||||
if: ${{ !cancelled() && needs.merge.result == 'success' && (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')) }}
|
if: ${{ !cancelled() && needs.merge.result == 'success' && (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')) }}
|
||||||
env:
|
|
||||||
HELM_CHARTS_DISPATCH_TOKEN: ${{ secrets.HELM_CHARTS_DISPATCH_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check dispatch token
|
- name: Create Helm charts app token
|
||||||
id: token
|
id: helm-app-token
|
||||||
run: |
|
uses: actions/create-github-app-token@v2
|
||||||
if [ -z "${HELM_CHARTS_DISPATCH_TOKEN}" ]; then
|
with:
|
||||||
echo "::warning::HELM_CHARTS_DISPATCH_TOKEN is not configured; skipping Helm chart automation dispatch."
|
app-id: ${{ secrets.HELM_CHARTS_APP_ID }}
|
||||||
echo "present=false" >> "${GITHUB_OUTPUT}"
|
private-key: ${{ secrets.HELM_CHARTS_APP_PRIVATE_KEY }}
|
||||||
else
|
owner: ${{ github.repository_owner }}
|
||||||
echo "present=true" >> "${GITHUB_OUTPUT}"
|
repositories: helm-charts
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: steps.token.outputs.present == 'true'
|
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Verify published Open WebUI image
|
- name: Verify published Open WebUI image
|
||||||
if: steps.token.outputs.present == 'true'
|
|
||||||
id: image
|
id: image
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -271,10 +266,9 @@ jobs:
|
|||||||
echo "tag=${image_tag}" >> "${GITHUB_OUTPUT}"
|
echo "tag=${image_tag}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Dispatch Helm chart automation
|
- name: Dispatch Helm chart automation
|
||||||
if: steps.token.outputs.present == 'true'
|
|
||||||
uses: actions/github-script@v8
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.HELM_CHARTS_DISPATCH_TOKEN }}
|
github-token: ${{ steps.helm-app-token.outputs.token }}
|
||||||
script: |
|
script: |
|
||||||
const isDev = context.ref === 'refs/heads/dev';
|
const isDev = context.ref === 'refs/heads/dev';
|
||||||
const eventType = isDev
|
const eventType = isDev
|
||||||
|
|||||||
Reference in new issue
Block a user