Skip to content

Commit

Permalink
chore(github): add brew update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jguer committed Jul 1, 2021
1 parent fd7bde7 commit 5cc6ec0
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,43 @@ jobs:
registry: docker.pkg.github.com
repository: gitguardian/gg-shield/ggshield
tag_with_ref: true

push_to_tap:
needs: pypi
name: Push GitGuardian tap
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Read info
id: tags
shell: bash
run: |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
- name: Checkout Homebrew-ggshield
uses: actions/checkout@master
with:
repository: GitGuardian/homebrew-ggshield
token: ${{ secrets.ACTIONS_TOKEN }}
path: ./brew

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ggshield homebrew-pypi-poet
poet -f ggshield | sed 's/Shiny new formula/Detect secret in sourcecode, scan your repos and docker images for leaks/g' | sed '7a\ license "MIT"' > brew/Formula/ggshield.rb
- name: Push brew
run: |
cd ./brew
git add Formula/ggshield.rb
git config user.name github-actions
git config user.email github-actions@github.com
git commit -am "update from ggshield"
git tag ${{ steps.tags.outputs.tag }}
git push --tags

0 comments on commit 5cc6ec0

Please sign in to comment.