Update Homebrew Formula For RustFS-ClI #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2024 RustFS Team | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Update Homebrew Formula For RustFS-ClI | |
| on: | |
| schedule: | |
| - cron: '0 */12 * * *' # twice a day | |
| workflow_dispatch: { } | |
| repository_dispatch: | |
| types: [ release ] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Run updater | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_UPSTREAM_REPO: rustfs/cli | |
| run: | | |
| ruby scripts/update_formula_cli.rb | |
| - name: Read latest version | |
| id: v | |
| run: echo "version=$(cat .latest_version)" >> $GITHUB_OUTPUT | |
| - name: Cleanup temporary files | |
| run: rm -f .latest_version | |
| - name: Clean up Git credentials | |
| run: git config --local --unset-all http.https://github.com/.extraheader || true | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: bump rustfs cli formula to ${{ steps.v.outputs.version }}" | |
| title: "chore: bump rustfs cli to ${{ steps.v.outputs.version }}" | |
| body: | | |
| Automated update to latest release ${{ steps.v.outputs.version }}. | |
| branch: "update/rustfs-cli-${{ steps.v.outputs.version }}" | |
| delete-branch: true |