feat: start update by branch

Here is a start to the update by branch
This commit is contained in:
Dustin Loring 2024-12-15 11:00:23 -05:00
parent aa3559149f
commit a698fba1c7
2 changed files with 6 additions and 3 deletions

View File

@ -20,14 +20,17 @@ jobs:
- name: Get the latest commit hash
run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Get the current branch name
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Update commit file
run: |
echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json
echo "{ \"commit\": \"$COMMIT_HASH\", \"branch\": \"$BRANCH_NAME\" }" > app/commit.json
- 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"
git add app/commit.json
git commit -m "chore: update commit hash to $COMMIT_HASH"
git commit -m "chore: update commit hash to $COMMIT_HASH on branch $BRANCH_NAME"
git push

View File

@ -1 +1 @@
{ "commit": "ece0213500a94a6b29e29512c5040baf57884014" }
{ "commit": "87a90718d31bd8ec501cb32f863efd26156fb1e2", "branch": "main" }