Skip to content

Commit

Permalink
Merge pull request #8331 from MikeMcQuaid/actions-cleanup
Browse files Browse the repository at this point in the history
GitHub Actions cleanup
  • Loading branch information
MikeMcQuaid authored Aug 13, 2020
2 parents 117cba9 + d2fc08d commit 24cb33b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ jobs:
persist-credentials: false
- name: Fetch origin/master from Git
run: git fetch origin master

- name: Build Docker image
run: docker build -t brew --build-arg=version=${{matrix.version}} .

- name: Run brew test-bot --only-setup
run: docker run --rm brew brew test-bot --only-setup

- name: Deploy the tagged Docker image to GitHub
if: startsWith(github.ref, 'refs/tags/')
run: |
Expand All @@ -35,6 +38,7 @@ jobs:
docker push "docker.pkg.github.com/homebrew/brew/ubuntu${{matrix.version}}:$brew_version"
docker tag brew "docker.pkg.github.com/homebrew/brew/ubuntu${{matrix.version}}:latest"
docker push "docker.pkg.github.com/homebrew/brew/ubuntu${{matrix.version}}:latest"
- name: Deploy the tagged Docker image to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
run: |
Expand All @@ -43,6 +47,7 @@ jobs:
docker push "homebrew/ubuntu${{matrix.version}}:$brew_version"
docker tag brew "homebrew/ubuntu${{matrix.version}}:latest"
docker push "homebrew/ubuntu${{matrix.version}}:latest"
- name: Deploy the homebrew/brew Docker image to GitHub and Docker Hub
if: startsWith(github.ref, 'refs/tags/') && matrix.version == '20.04'
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Run brew test-bot --only-cleanup-before
run: brew test-bot --only-cleanup-before
- run: brew test-bot --only-cleanup-before

- name: Run brew test-bot --only-setup
run: brew test-bot --only-setup
- run: brew test-bot --only-setup

- name: Run brew test-bot --only-cleanup-after
- run: brew test-bot --only-cleanup-after
if: always()
run: brew test-bot --only-cleanup-after
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: GitHub Actions CI
on:
push:
branches: master
pull_request: []
pull_request:
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Cache Bundler RubyGems
id: cache
uses: actions/cache@main
uses: actions/cache@v1
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
Expand Down
14 changes: 5 additions & 9 deletions Library/Homebrew/dev-cmd/tap-new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def tap_new
- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@main
uses: actions/cache@v1
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
Expand All @@ -74,18 +74,14 @@ def tap_new
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems
- name: Run brew test-bot --only-cleanup-before
run: brew test-bot --only-cleanup-before
- run: brew test-bot --only-cleanup-before
- name: Run brew test-bot --only-setup
run: brew test-bot --only-setup
- run: brew test-bot --only-setup
- name: Run brew test-bot --only-tap-syntax
run: brew test-bot --only-tap-syntax
- run: brew test-bot --only-tap-syntax
- name: Run brew test-bot --only-formulae
- run: brew test-bot --only-formulae
if: github.event_name == 'pull_request'
run: brew test-bot --only-formulae
YAML

(tap.path/".github/workflows").mkpath
Expand Down

0 comments on commit 24cb33b

Please sign in to comment.