Skip to content

Commit

Permalink
Create commit.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke authored Jan 17, 2025
1 parent f9d3a5c commit ffe4f6b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Update Chart.yaml

on:
workflow_dispatch:

jobs:
update-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Modify Chart.yaml
run: |
echo "${{ github.sha }}" > commit.txt
- name: Commit Changes Using GraphQL API
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api graphql -F query='
mutation($input: CreateCommitOnBranchInput!) {
createCommitOnBranch(input: $input) {
commit {
url
}
}
}' \
-F variables='{
"input": {
"branch": {
"repositoryNameWithOwner": "${{ github.repository }}",
"branchName": "main"
},
"expectedHeadOid": "${{ github.sha }}",
"message": {
"headline": "Update Chart.yaml"
},
"fileChanges": {
"additions": [
{
"path": "commit.txt",
"contents": "$(cat commit.txt | base64 -w 0)"
}
],
"deletions": []
}
}
}'

0 comments on commit ffe4f6b

Please sign in to comment.