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:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/sponsors-maintainers-man-completions.yml
|
- .github/workflows/maintainers-man-completions.yml
|
||||||
- README.md
|
- README.md
|
||||||
- Library/Homebrew/cmd/**
|
- Library/Homebrew/cmd/**
|
||||||
- Library/Homebrew/dev-cmd/**
|
- Library/Homebrew/dev-cmd/**
|
||||||
@ -12,8 +12,6 @@ on:
|
|||||||
- Library/Homebrew/cli/parser.rb
|
- Library/Homebrew/cli/parser.rb
|
||||||
- Library/Homebrew/completions.rb
|
- Library/Homebrew/completions.rb
|
||||||
- Library/Homebrew/env_config.rb
|
- Library/Homebrew/env_config.rb
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -27,6 +25,7 @@ jobs:
|
|||||||
if: github.repository == 'Homebrew/brew'
|
if: github.repository == 'Homebrew/brew'
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Homebrew
|
- name: Setup Homebrew
|
||||||
|
id: set-up-homebrew
|
||||||
uses: Homebrew/actions/setup-homebrew@master
|
uses: Homebrew/actions/setup-homebrew@master
|
||||||
|
|
||||||
- name: Configure Git user
|
- name: Configure Git user
|
||||||
@ -39,12 +38,24 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
signing_key: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY }}
|
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
|
id: update
|
||||||
run: |
|
run: |
|
||||||
git fetch origin
|
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}"
|
echo "::set-output name=branch::${BRANCH}"
|
||||||
|
|
||||||
if git ls-remote --exit-code --heads origin "${BRANCH}"
|
if git ls-remote --exit-code --heads origin "${BRANCH}"
|
||||||
@ -64,15 +75,7 @@ jobs:
|
|||||||
"${GITHUB_WORKSPACE}/docs/Manpage.md" \
|
"${GITHUB_WORKSPACE}/docs/Manpage.md" \
|
||||||
"${GITHUB_WORKSPACE}/manpages/brew.1"
|
"${GITHUB_WORKSPACE}/manpages/brew.1"
|
||||||
git commit -m "Update maintainers." \
|
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."
|
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/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."
|
|
||||||
COMMITTED=true
|
COMMITTED=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -83,7 +86,7 @@ jobs:
|
|||||||
"${GITHUB_WORKSPACE}/manpages/brew.1" \
|
"${GITHUB_WORKSPACE}/manpages/brew.1" \
|
||||||
"${GITHUB_WORKSPACE}/completions"
|
"${GITHUB_WORKSPACE}/completions"
|
||||||
git commit -m "Update manpage and 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
|
COMMITTED=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
3
.github/workflows/spdx.yml
vendored
3
.github/workflows/spdx.yml
vendored
@ -7,8 +7,11 @@ on:
|
|||||||
- master
|
- master
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
spdx:
|
spdx:
|
||||||
if: github.repository == 'Homebrew/brew'
|
if: github.repository == 'Homebrew/brew'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user