File tree Expand file tree Collapse file tree
templates/twig-component/.github/workflows Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Workflow for Depency Track and Trivy
22env :
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
55on :
66 push :
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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11name : Workflow for Depency Track and Trivy
22env :
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 }}
44on :
55 push :
66 paths :
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
You can’t perform that action at this time.
0 commit comments