Skip to content

update

update #2

Workflow file for this run

name: update
on:
workflow_dispatch:
schedule:
- cron: '0 21 * * 1'
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Download latest release.
wget https://github.com/fastfloat/fast_float/releases/latest/download/fast_float.h
# Do nothing if there is no change.
if ! git diff --exit-code --quiet
then
# Use github credentials for pushing.
gh auth setup-git
git config --global user.name 'Cheng'
git config --global user.email 'cheng@zcbenz.com'
# Commit change and push
git checkout -b update-latest-fastfloat
git commit -a -m 'Update to latest fastfloat'
git push --force origin HEAD
# Create PR.
gh pr create --base main --head update-latest-fastfloat \
--title 'Update to latest fastfloat changes' \
--body ''
fi