Skip to content

Commit

Permalink
🐎 ci(*): update
Browse files Browse the repository at this point in the history
  • Loading branch information
mozhu1024 committed Jul 15, 2024
1 parent 7e764ee commit 5a95b43
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,15 @@ jobs:
HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ github.token }}
HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.actor }}
PULL_REQUEST: ${{ github.event.pull_request.number }}
run: brew pr-pull --debug --no-upload --tap=$GITHUB_REPOSITORY --root-url=http://r2.virzz.bid/virzz $PULL_REQUEST
run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST

- name: Pull bottles (with root-url)
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }}
HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ github.token }}
HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.actor }}
PULL_REQUEST: ${{ github.event.pull_request.number }}
run: brew pr-pull --debug --no-upload --tap=$GITHUB_REPOSITORY --root-url=https://r2.virzz.bid/virzz $PULL_REQUEST

- name: Push commits
uses: Homebrew/actions/git-try-push@master
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: brew test-bot
on:
push:
branches:
- "*-*"
- '*-*'
pull_request:

jobs:
Expand Down Expand Up @@ -40,24 +40,23 @@ jobs:
if: github.event_name == 'pull_request'
run: |
brew install go
brew test-bot -d --only-formulae --root-url=http://virzz-img.ctfhub.com/tools/virzz
brew test-bot -d --only-formulae --root-url=https://r2.virzz.bid/virzz
mkdir -p bottles
ls *.bottle.* | awk -F '--' '{print "cp "$0" ./bottles/"$1"-"$2}' | sh
- name: Upload bottles Qiniu
if: always() && github.event_name == 'pull_request'
uses: hocgin/[email protected]
- name: Upload bottles s3
uses: shallwefootball/[email protected]
with:
access_key: ${{ secrets.QINIU_ACCESS_KEY }}
secret_key: ${{ secrets.QINIU_SECRET_KEY }}
bucket: ${{ secrets.QINIU_BUCKET }}
endpoint: ${{ secrets.AWS_ENDPOINT }}
aws_key_id: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_KEY }}
aws_bucket: virzz
source_dir: bottles
dest_dir: /tools/virzz/ # /tools/virzz/*.bottle.*
overwrite: ture
destination_dir: virzz/

- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@main
with:
name: bottles
path: "*.bottle.*"
path: '*.bottle.*'

0 comments on commit 5a95b43

Please sign in to comment.