@@ -21,56 +21,22 @@ jobs:
2121 GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
2222
2323 deploy-packages :
24- name : Deploy rpm/dep packages
24+ name : Deploy rpm/deb packages
2525 needs : release # run this job after 'release' job completes
26- runs-on : ubuntu-22.04
26+ runs-on : ubuntu-2404-2core
2727 steps :
28- - name : Checkout code
29- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30- with :
31- fetch-depth : 0
32- persist-credentials : false
33-
34- # Cache is keyed by github.sha and scoped to tag-push events triggered by maintainers only.
35- # Cache is written exclusively by the release job (reusable-release.yaml) on the same
36- # tag-push event. Only maintainers can push tags, so external contributors cannot influence
37- # the cache contents. The key includes github.sha to prevent collisions across runs.
38- - name : Restore Trivy binaries from cache
39- uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 # zizmor: ignore[cache-poisoning]
40- with :
41- path : dist/
42- key : ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
43-
44- - name : Install dependencies
45- run : |
46- sudo apt-get -y update
47- sudo apt-get -y install rpm reprepro createrepo-c distro-info
48-
49- - name : Checkout trivy-repo
50- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
51- with :
52- repository : ${{ github.repository_owner }}/trivy-repo
53- path : trivy-repo
54- token : ${{ secrets.ORG_REPO_TOKEN }}
55- persist-credentials : true # deploy-rpm.sh and deploy-deb.sh run git push
56-
57- - name : Setup git settings
28+ - name : Trigger deploy-packages workflow in trivy-repo
29+ env :
30+ GH_TOKEN : ${{ secrets.TRIVY_WORKFLOW_TRIGGER_TOKEN }}
5831 run : |
59- git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
60- git config --global user.name "github-actions[bot]"
61-
62- - name : Create rpm repository
63- run : ci/deploy-rpm.sh
64-
65- - name : Import GPG key
66- run : echo -e "${{ secrets.GPG_KEY }}" | gpg --import
67-
68- - name : Create deb repository
69- run : ci/deploy-deb.sh
32+ gh workflow run deploy-packages.yml \
33+ --repo "$GITHUB_REPOSITORY_OWNER/trivy-repo" \
34+ --ref main \
35+ --field "version=$GITHUB_REF_NAME"
7036
7137 # `update-chart-version` creates a new PR for updating the helm chart
7238 update-chart-version :
73- needs : deploy-packages
39+ needs : release
7440 runs-on : ubuntu-22.04
7541 steps :
7642 - name : Checkout
9965
10066 # `trigger-version-update` triggers workflows in the `aqua` repositories to update the Trivy version.
10167 trigger-version-update :
102- needs : deploy-packages
68+ needs : release
10369 runs-on : ubuntu-22.04
10470 steps :
10571 - name : Trigger update_version workflow in trivy-telemetry
0 commit comments