Merge pull request #8331 from MikeMcQuaid/actions-cleanup

GitHub Actions cleanup
This commit is contained in:
Mike McQuaid 2020-08-13 15:41:52 +01:00 committed by GitHub
commit 24cb33b023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 17 deletions

View File

@ -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: |
@ -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: |
@ -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: |

View File

@ -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

View File

@ -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
@ -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 }}

View File

@ -64,7 +64,7 @@ module Homebrew
- 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 }}
@ -74,18 +74,14 @@ module Homebrew
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