Skip to content

Commit ab448d8

Browse files
committed
fix: symfony bundle publish task
1 parent cf1949c commit ab448d8

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/dtrack-trivy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Workflow for Depency Track and Trivy
22
env:
3-
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
3+
BRANCH_NAME: ${{ github.head_ref || (github.ref_type == 'branch' && github.ref_name) || github.event.repository.default_branch }}
44
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
55
on:
66
push:
@@ -52,7 +52,7 @@ jobs:
5252
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
5353
git add sbom.json
5454
git commit -am "sbom.json updated" --no-verify || exit 1
55-
git push origin HEAD:${BRANCH_NAME} -f
55+
git push origin HEAD:refs/heads/${BRANCH_NAME} -f
5656
continue-on-error: false
5757

5858
- name: Push SBOM to Dependency Track

.github/workflows/release-symfony-bundle.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ jobs:
3636
git config --global url."https://${GH_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
3737
3838
git clone https://github.com/vardumper/html5-twig-component-bundle.git target
39-
rsync -a --delete --exclude='.git/' templates/twig-component/ target/
39+
# Sync dotfiles as well, but skip workflow files unless PAT has workflow scope.
40+
rsync -a --delete \
41+
--exclude='.git/' \
42+
--exclude='.github/workflows/' \
43+
templates/twig-component/ target/
4044
cd target
4145
4246
# Update version in composer.json

templates/twig-component/.github/workflows/dtrack-trivy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Workflow for Depency Track and Trivy
22
env:
3-
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
3+
BRANCH_NAME: ${{ github.head_ref || (github.ref_type == 'branch' && github.ref_name) || github.event.repository.default_branch }}
44
on:
55
push:
66
paths:
@@ -58,7 +58,7 @@ jobs:
5858
exit 0
5959
fi
6060
git commit -m "chore: update sbom.json" --no-verify
61-
git push origin HEAD:${BRANCH_NAME}
61+
git push origin HEAD:refs/heads/${BRANCH_NAME}
6262
continue-on-error: false
6363

6464
- name: Push SBOM to Dependency Track

0 commit comments

Comments
 (0)