github actions

This commit is contained in:
Jarred Sumner
2024-11-27 17:34:28 -08:00
parent 7fd16ebffa
commit bd01df19c1
5 changed files with 95 additions and 85 deletions

View File

@@ -37,25 +37,27 @@ jobs:
exit 1
fi
echo "latest=$LATEST_SHA" >> $GITHUB_OUTPUT
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Create PR if update needed
- name: Update version if needed
if: success() && steps.check-version.outputs.current != steps.check-version.outputs.latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="update-libdeflate-${GITHUB_SHA::8}"
git checkout -b "$BRANCH"
sed -i "s/LIBDEFLATE_VERSION\s\+[0-9a-f]\+/LIBDEFLATE_VERSION ${{ steps.check-version.outputs.latest }}/" cmake/targets/BuildLibDeflate.cmake
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add cmake/targets/BuildLibDeflate.cmake
git commit -m "deps: update libdeflate to ${{ steps.check-version.outputs.latest }}"
git push origin "$BRANCH"
gh pr create \
--title "deps: update libdeflate to ${LATEST_SHA::8}" \
--body "Updates libdeflate from ${CURRENT_VERSION::8} to ${LATEST_SHA::8}" \
--base main \
--head "$BRANCH"
- name: Create Pull Request
if: success() && steps.check-version.outputs.current != steps.check-version.outputs.latest
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: |
cmake/targets/BuildLibDeflate.cmake
commit-message: "deps: update libdeflate to ${{ steps.check-version.outputs.latest }}"
title: "deps: update libdeflate to ${{ steps.check-version.outputs.latest }}"
delete-branch: true
branch: deps/update-libdeflate-${{ steps.check-version.outputs.latest }}
body: |
## What does this PR do?
Updates libdeflate to version ${{ steps.check-version.outputs.tag }}
Auto-updated by [this workflow](https://github.com/oven-sh/bun/actions/workflows/update-libdeflate.yml)