Skip to content

Commit

Permalink
Update release-sync.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaski committed Feb 1, 2024
1 parent 1f1067b commit dc7698b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ jobs:
- name: Determine sync status and fetch commits
id: prep
run: |
LATEST_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1))
LATEST_COMMIT=$(git log -1 --format=%H)
COMMITS_SINCE_LAST_RELEASE=$(git log $LATEST_RELEASE..HEAD --oneline)
if [[ "$LATEST_RELEASE" != "$LATEST_COMMIT" ]]; then
LATEST_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null | head -1)
LATEST_RELEASE_COMMIT=$(git describe --tags --exact-match ${GITHUB_SHA} 2>/dev/null | head -1)
COMMITS_SINCE_LAST_RELEASE=$(git log ${LATEST_RELEASE_COMMIT}..HEAD --oneline)
echo "LATEST_RELEASE: ${LATEST_RELEASE}"
echo "LATEST_RELEASE_COMMIT: ${LATEST_RELEASE_COMMIT}"
echo "COMMITS_SINCE_LAST_RELEASE: ${COMMITS_SINCE_LAST_RELEASE}"
if [[ "${LATEST_RELEASE_COMMIT}" != "${GITHUB_SHA}" ]]; then
echo "REPO_IN_SYNC=false" >> $GITHUB_ENV
else
echo "REPO_IN_SYNC=true" >> $GITHUB_ENV
fi
echo "${COMMITS_SINCE_LAST_RELEASE}"
echo "commits_since_last_release="${COMMITS_SINCE_LAST_RELEASE}"" >> $GITHUB_OUTPUT
- name: Manage issues based on sync status
Expand Down

0 comments on commit dc7698b

Please sign in to comment.