Skip to content

Commit

Permalink
add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Emterry committed Feb 29, 2024
1 parent b762f5c commit 1e088a9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,26 @@ jobs:
with:
context: .
push: false

preflight-checks:
name: Preflight Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Check CHANGELOG Updates
id: check_changelog_updates
env:
GH_TOKEN: ${{ github.token }}
run: |
mainSha=$(gh api --method GET /repos/"${GITHUB_REPOSITORY}"/contents/CHANGELOG.md --field ref="main" | jq -r '.sha')
branchSha=$(gh api --method GET /repos/"${GITHUB_REPOSITORY}"/contents/CHANGELOG.md --field ref="${GITHUB_HEAD_REF}" | jq -r '.sha')
if [[ "${mainSha}" == "${branchSha}" ]]; then
echo "CHANGELOG.md matches main branch, needs to be updated"
exit 1
elif [[ "${mainSha}" != "${branchSha}" ]]; then
echo "CHANGELOG.md does not match main branch, does not need to be updated"
fi
Empty file added CHANGELOG.md
Empty file.

0 comments on commit 1e088a9

Please sign in to comment.