Update build.yml

This commit is contained in:
ilangelov 2025-02-23 10:24:56 +02:00 committed by GitHub
parent 45bb7fa699
commit 7ab9e6f0b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,20 +52,24 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
outputs:
ci_build: ${{ steps.check.outputs.ci_build }}
ci_build: ${{ steps.label-check.outputs.ci_build }}
steps:
- name: Get PR Labels
id: check
- name: Fetch PR Labels
id: label-check
run: |
echo "Fetching labels for PR #${{ github.event.pull_request.number }}..."
LABELS=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" | jq -r '.[].name')
echo "Labels found: $LABELS"
echo "Found labels: $LABELS"
if echo "$LABELS" | grep -q "CI:Build"; then
echo "ci_build=true" >> $GITHUB_ENV
echo "::set-output name=ci_build::true"
else
echo "ci_build=false" >> $GITHUB_ENV
echo "::set-output name=ci_build::false"
fi
build-docker: