Skip to content

manually commit and push changes #17

manually commit and push changes

manually commit and push changes #17

Workflow file for this run

name: Release Helm Chart

Check failure on line 1 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yaml

Invalid workflow file

(Line: 28, Col: 13): The identifier 'save-sha' may not be used more than once within the same scope.
on:
push:
branches:
- main
paths:
- charts/s3proxy/**
jobs:
update-readme:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: main
persist-credentials: false
- name: Save HEAD SHA before helm-docs
id: save-sha
run: |
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Save HEAD SHA before helm-docs
id: save-sha
run: |
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Render helm docs inside the README.md and push changes back to PR branch
uses: losisin/helm-docs-github-action@v1
with:
output-file: ../../README.md
template-files: README.md.gotmpl
git-push: false
- name: Check for README changes
id: check-changes
run: |
if git diff --quiet ${{ steps.save-sha.outputs.sha }} -- README.md
then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push
if: steps.check-changes.outputs.has_changes == 'true'
run: |
git config --global user.name "Comet Actions"
git config --global user.email "github-actions@comet.com"
# stage any file changes to be committed
git add README.md
# make commit with staged changes
git commit -m 'Update README.md with helm-docs'
- name: Push changes
if: success()
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.COMET_ACTIONS_PAT }}
branch: ${{ github.event.master_branch }}
release:
runs-on: ubuntu-latest
needs:
- update-readme
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: main
- name: Configure Git
run: |
git config --global user.name 'Github Actions (${{ github.actor }})'
git config --global user.email 'github-actions@comet.com'
- name: Run chart-releaser
uses: bitdeps/helm-oci-charts-releaser@v0.1.3
with:
oci_registry: ghcr.io/comet-ml
tag_name_pattern: ''
oci_username: github-actions
oci_password: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}