Skip to content

Commit

Permalink
wip13
Browse files Browse the repository at this point in the history
  • Loading branch information
maci3jka committed Nov 14, 2024
1 parent 088f9bf commit a445042
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ on:
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
branches: ${{ steps.branches.outputs.branches }}
steps:
- name: Checking out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: create branches to test
id: branches
run: |
BRANCHES=$(git branch -r | grep -E '(v[0-9]+.[0-9]+)|(release-[0-9]+.[0-9]+)|([0-9]+.[0-9]+$)' | sed -e 's#^ origin/##' | jq -R -s -c 'split("\n")[:-1]')
echo "$BRANCHES"
echo "BRANCHES=$(echo $BRANCHES)" >> $GITHUB_ENV
echo "name=BRANCHES::$(echo $BRANCHES)" >> $GITHUB_OUTPUT
echo "name=branches::$(echo $BRANCHES)" >> $GITHUB_OUTPUT
- name: list branches to test
run: |
echo ${{ fromJson(env.BRANCHES) }}
Expand All @@ -34,7 +37,7 @@ jobs:
matrix:
branch: ["1.28"]
# branch: ["1.28","release-1.30","release-1.31","v1.1"]
# branch: ${{ needs.prepare.outputs.BRANCHES }}
# branch: ${{ needs.prepare.outputs.branches }}
# branch: [master]
permissions:
security-events: write
Expand All @@ -47,7 +50,7 @@ jobs:
- name: current branch
run: |
git rev-parse --abbrev-ref HEAD
echo "${{ needs.prepare.outputs.BRANCHES }}"
echo "${{ needs.prepare.outputs.branches }}"
# - name: Run Trivy vulnerability scanner in repo mode
# uses: aquasecurity/[email protected]
# with:
Expand Down

0 comments on commit a445042

Please sign in to comment.