Skip to content

Commit

Permalink
github: Add common-instancetypes-version annotation during release
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
  • Loading branch information
lyarwood committed Jun 15, 2023
1 parent 17f59da commit a17d006
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ jobs:
uses: actions/checkout@v2
- name: Build
run: |
export VERSION="${{ github.ref_name }}"
for f in $(ls *bundle.yaml); do
cp ${f} ${f/\.yaml/-${{ github.ref_name }}\.yaml}
cp ${f} ${f/\.yaml/-${VERSION}\.yaml}
done
# Install yq and use it to update each resource with an instancetype.kubevirt.io/common-instancetypes-version annotation
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O ./yq && chmod +X ./yq
yq -i '.metadata.annotations.["instancetype.kubevirt.io/common-instancetypes-version"]=env(VERSION)' *bundle-${VERSION}.yaml
- name: Release
id: release
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit a17d006

Please sign in to comment.