mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-24 03:58:12 -08:00
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
uses: ./.github/workflows/reusable-release.yaml
|
|
with:
|
|
goreleaser_config: goreleaser.yml
|
|
goreleaser_options: '--rm-dist --timeout 90m'
|
|
secrets: inherit
|
|
|
|
deploy-packages:
|
|
name: Deploy rpm/dep packages
|
|
needs: release # run this job after 'release' job completes
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Restore Trivy binaries from cache
|
|
uses: actions/cache@v3.3.1
|
|
with:
|
|
path: dist/
|
|
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get -y update
|
|
sudo apt-get -y install rpm reprepro createrepo-c distro-info
|
|
|
|
- name: Checkout trivy-repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: ${{ github.repository_owner }}/trivy-repo
|
|
path: trivy-repo
|
|
fetch-depth: 0
|
|
token: ${{ secrets.ORG_REPO_TOKEN }}
|
|
|
|
- name: Setup git settings
|
|
run: |
|
|
git config --global user.email "knqyf263@gmail.com"
|
|
git config --global user.name "Teppei Fukuda"
|
|
|
|
- name: Create rpm repository
|
|
run: ci/deploy-rpm.sh
|
|
|
|
- name: Import GPG key
|
|
run: echo -e "${{ secrets.GPG_KEY }}" | gpg --import
|
|
|
|
- name: Create deb repository
|
|
run: ci/deploy-deb.sh
|