diff --git a/.github/workflows/commit.yaml b/.github/workflows/commit.yaml index d5db06b..fc41e67 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 1636c99..aba90c6 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "ece0213500a94a6b29e29512c5040baf57884014" } +{ "commit": "87a90718d31bd8ec501cb32f863efd26156fb1e2", "branch": "main" }