mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
fill version info from release and git directly (#2244)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
parent
671ff39933
commit
f3d95aa3a9
21
.github/workflows/release-homebrew.yaml
vendored
21
.github/workflows/release-homebrew.yaml
vendored
@ -10,12 +10,33 @@ jobs:
|
|||||||
homebrew:
|
homebrew:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
|
||||||
|
with:
|
||||||
|
# we need to be able to get the commit for a tag
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get release info
|
||||||
|
id: release_info
|
||||||
|
run: |
|
||||||
|
echo -n "tag_name=$(gh release view --json tagName --jq '.tagName')" | tee -a $GITHUB_OUTPUT
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get commit info
|
||||||
|
id: git_info
|
||||||
|
run: |
|
||||||
|
git checkout ${{ steps.release_info.outputs.tag_name }}
|
||||||
|
echo -n "commit=$(git rev-parse HEAD)" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Update Homebrew formula
|
- name: Update Homebrew formula
|
||||||
uses: dawidd6/action-homebrew-bump-formula@d3667e5ae14df19579e4414897498e3e88f2f458 # v3.10.0
|
uses: dawidd6/action-homebrew-bump-formula@d3667e5ae14df19579e4414897498e3e88f2f458 # v3.10.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.HOMEBREW_TOKEN }}
|
token: ${{ secrets.HOMEBREW_TOKEN }}
|
||||||
org: anchore
|
org: anchore
|
||||||
formula: syft
|
formula: syft
|
||||||
|
tag: ${{ steps.release_info.outputs.tag_name }}
|
||||||
|
revision: ${{ steps.git_info.outputs.commit }}
|
||||||
|
|
||||||
- uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #v3.15.1
|
- uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #v3.15.1
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user