Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup GitHub Actions workflow permissions #179541

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/config.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/automerge.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/dispatch-command.yml

This file was deleted.

43 changes: 27 additions & 16 deletions .github/workflows/google-fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Checkout google/fonts
uses: actions/checkout@v4
with:
Expand All @@ -38,27 +39,37 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Python packages
run: pip3 install gftools html2text jinja2 protobuf

- name: Configure Git user
id: git-user-config
uses: Homebrew/actions/git-user-config@master
with:
username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'BrewTestBot' }}

- name: Set up commit signing
uses: Homebrew/actions/setup-commit-signing@master
with:
signing_key: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY }}

- name: Import Google Fonts
run: ./developer/bin/import_google_fonts vendor/google-fonts ${{ matrix.mode }}

- name: Create pull request with updated files
id: create-pull-request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
with:
branch: auto-${{ matrix.mode }}-google-fonts
commit-message: Update Google Fonts
base: master
author: BrewTestBot <[email protected]>
committer: BrewTestBot <[email protected]>
title: Automatic ${{ matrix.noun }} of Google Fonts
body: |
This pull request was created automatically by the [`google-fonts`](https://github.com/Homebrew/homebrew-cask/blob/master/.github/workflows/google-fonts.yml) workflow.
token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
- name: Print pull request URL
if: steps.create-pull-request.outputs.pull-request-number
run: |
echo "Created pull request:"
echo " https://github.com/${{ github.repository }}/pull/${{ steps.create-pull-request.outputs.pull-request-number }}"
set -euo pipefail

if ! git diff --stat --exit-code
then
git checkout -b "auto-${{ matrix.mode }}-google-fonts"

git commit -am "Update Google Fonts" -m "This pull request was created automatically by the [\`google-fonts\`](https://github.com/Homebrew/homebrew-cask/blob/master/.github/workflows/google-fonts.yml) workflow."

gh pr create --head "auto-${{ matrix.mode }}-google-fonts"
fi
env:
GIT_COMMITTER_NAME: ${{ steps.git-user-config.outputs.name }}
GIT_COMMITTER_EMAIL: ${{ steps.git-user-config.outputs.email }}
HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
38 changes: 0 additions & 38 deletions .github/workflows/rebase.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/rerun-workflow.yml

This file was deleted.