Skip to content

Commit

Permalink
ci: Update plugin.yaml with released version on release
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson committed Jun 29, 2023
1 parent 726af34 commit 40ad2d4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/release-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,23 @@ jobs:
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update released plugin version in plugin.yaml
run: yq -i -y '.version |= ("${{ github.ref }}" | sub("^v";""))' plugin.yaml

# Use the REST API to update plugin.yaml, so we get automatic commit signing.
- name: Commit changes to plugin.yaml via REST API
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILE_TO_COMMIT: plugin.yaml
DESTINATION_BRANCH: main
run: |
export MESSAGE="build: Update plugin.yaml to version ${{ github.ref }}"
export SHA="$( git rev-parse ${DESTINATION_BRANCH}:${FILE_TO_COMMIT} )""
export CONTENT="$( base64 -i ${FILE_TO_COMMIT} )"
gh api --method PUT /repos/:owner/:repo/contents/${FILE_TO_COMMIT} \
--field message="${MESSAGE}" \
--field content="${CONTENT}" \
--field encoding="base64" \
--field branch="${DESTINATION_BRANCH}" \
--field sha="${SHA}"
1 change: 0 additions & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: "list-images"
version: "0.5.0"
usage: "Lists all/selected docker images that are part of deployment"
description: "Lists all/selected docker images that would be part of deployment of selected chart"
useTunnel: true
command: "$HELM_PLUGIN_DIR/bin/helm-list-images"
hooks:
install: "$HELM_PLUGIN_DIR/install-binary.sh"
Expand Down

0 comments on commit 40ad2d4

Please sign in to comment.