From 5a95b434faa3bbbcef170ef95a06b86097db8e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=8C=E7=AB=B9?= Date: Tue, 16 Jul 2024 01:55:48 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=8E=20ci(*):=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 10 +++++++++- .github/workflows/tests.yml | 21 ++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 12b655d..1b635ec 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7043f83..2acc172 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ name: brew test-bot on: push: branches: - - "*-*" + - '*-*' pull_request: jobs: @@ -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/action-qiniu-upload@v0.0.5 + - name: Upload bottles s3 + uses: shallwefootball/upload-s3-action@v1.3.3 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.*'