From a698fba1c74aacb6b89dfd97e81053030af61973 Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Sun, 15 Dec 2024 11:00:23 -0500 Subject: [PATCH] feat: start update by branch Here is a start to the update by branch --- .github/workflows/commit.yaml | 7 +++++-- app/commit.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/commit.yaml b/.github/workflows/commit.yaml index d5db06b0..fc41e67f 100644 --- a/.github/workflows/commit.yaml +++ b/.github/workflows/commit.yaml @@ -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 \ No newline at end of file diff --git a/app/commit.json b/app/commit.json index 1636c99b..aba90c6e 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "ece0213500a94a6b29e29512c5040baf57884014" } +{ "commit": "87a90718d31bd8ec501cb32f863efd26156fb1e2", "branch": "main" }