bolt.diy/.github/workflows/commit.yaml

33 lines
835 B
YAML
Raw Normal View History

2024-12-07 15:27:50 +00:00
name: Update Commit Hash File
on:
push:
branches:
- main
permissions:
contents: write
jobs:
update-commit:
2024-12-13 12:19:46 +00:00
if: contains(github.event.head_commit.message, '#release') != true
2024-12-07 15:27:50 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Get the latest commit hash
run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Update commit file
run: |
2024-12-07 15:53:33 +00:00
echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json
2024-12-07 15:27:50 +00:00
- name: Commit and push the update
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
2024-12-07 15:53:33 +00:00
git add app/commit.json
2024-12-07 15:27:50 +00:00
git commit -m "chore: update commit hash to $COMMIT_HASH"
git push