Merge pull request #13805 from Homebrew/workflows-fixes
.github/workflows: various fixes.
This commit is contained in:
commit
79c6ab25e2
@ -1,9 +1,9 @@
|
||||
name: Update sponsors, maintainers, manpage and completions
|
||||
name: Update maintainers, manpage and completions
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/sponsors-maintainers-man-completions.yml
|
||||
- .github/workflows/maintainers-man-completions.yml
|
||||
- README.md
|
||||
- Library/Homebrew/cmd/**
|
||||
- Library/Homebrew/dev-cmd/**
|
||||
@ -12,8 +12,6 @@ on:
|
||||
- Library/Homebrew/cli/parser.rb
|
||||
- Library/Homebrew/completions.rb
|
||||
- Library/Homebrew/env_config.rb
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
@ -27,6 +25,7 @@ jobs:
|
||||
if: github.repository == 'Homebrew/brew'
|
||||
steps:
|
||||
- name: Setup Homebrew
|
||||
id: set-up-homebrew
|
||||
uses: Homebrew/actions/setup-homebrew@master
|
||||
|
||||
- name: Configure Git user
|
||||
@ -39,12 +38,24 @@ jobs:
|
||||
with:
|
||||
signing_key: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY }}
|
||||
|
||||
- name: Update sponsors, maintainers, manpage and completions
|
||||
- name: Cache Bundler RubyGems
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
|
||||
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
|
||||
restore-keys: ${{ runner.os }}-rubygems-
|
||||
|
||||
- name: Update maintainers, manpage and completions
|
||||
id: update
|
||||
run: |
|
||||
git fetch origin
|
||||
|
||||
BRANCH=sponsors-maintainers-man-completions
|
||||
if [[ -n "$GITHUB_REF_NAME" && "$GITHUB_REF_NAME" != "master" ]]
|
||||
then
|
||||
BRANCH="$GITHUB_REF_NAME"
|
||||
else
|
||||
BRANCH=maintainers-man-completions
|
||||
fi
|
||||
echo "::set-output name=branch::${BRANCH}"
|
||||
|
||||
if git ls-remote --exit-code --heads origin "${BRANCH}"
|
||||
@ -64,15 +75,7 @@ jobs:
|
||||
"${GITHUB_WORKSPACE}/docs/Manpage.md" \
|
||||
"${GITHUB_WORKSPACE}/manpages/brew.1"
|
||||
git commit -m "Update maintainers." \
|
||||
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow."
|
||||
COMMITTED=true
|
||||
fi
|
||||
|
||||
if brew update-sponsors
|
||||
then
|
||||
git add "${GITHUB_WORKSPACE}/README.md"
|
||||
git commit -m "Update sponsors." \
|
||||
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow."
|
||||
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/maintainers-man-completions.yml) workflow."
|
||||
COMMITTED=true
|
||||
fi
|
||||
|
||||
@ -83,7 +86,7 @@ jobs:
|
||||
"${GITHUB_WORKSPACE}/manpages/brew.1" \
|
||||
"${GITHUB_WORKSPACE}/completions"
|
||||
git commit -m "Update manpage and completions." \
|
||||
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow."
|
||||
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/maintainers-man-completions.yml) workflow."
|
||||
COMMITTED=true
|
||||
fi
|
||||
|
||||
3
.github/workflows/spdx.yml
vendored
3
.github/workflows/spdx.yml
vendored
@ -7,8 +7,11 @@ on:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
spdx:
|
||||
if: github.repository == 'Homebrew/brew'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user