add a way for a user to add extra args to ocv #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: autotag | |
on: | |
push: | |
branches: [main] | |
jobs: | |
autotag: | |
runs-on: minafoundation-default-interruptible-runners | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 0 | |
- name: Find and Tag Chart Files | |
run: | | |
find . -name "Chart.yaml" | while read chart_file; do | |
chart_name=$(yq '.name' "$chart_file") | |
chart_version=$(yq '.version' "$chart_file") | |
tag="${chart_name}-${chart_version}" | |
if git tag -l | grep -q "^${tag}$"; then | |
echo "Tag ${tag} already exists. Skipping." | |
else | |
echo "Creating tag ${tag}" | |
git tag "${tag}" | |
git push origin "${tag}" | |
fi | |
done |