Skip to content

Commit

Permalink
todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscaner committed Jan 12, 2024
1 parent 037e204 commit ad7ef12
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 16 deletions.
7 changes: 4 additions & 3 deletions .github/actions/bump-casks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ runs:
# 1 * 60 * 24 = 1440 (because bump-pr will checkout a new branch and push to remote)
# 1 concurrent parallel jobs, 1 second delay between jobs.
run: |
parallel -j1 --delay 1s --group --halt now,fail=1 \
"./.github/actions/bump-casks/script.sh {}" \
::: $(ls $(brew --repository brewforge/chinese)/Casks/*.rb | xargs -I {} basename {} .rb)
cat ./.github/actions/bump-casks/script.sh
# parallel -j1 --delay 1s --group --halt now,fail=1 \
# "./.github/actions/bump-casks/script.sh {}" \
# ::: $(ls $(brew --repository brewforge/chinese)/Casks/*.rb | xargs -I {} basename {} .rb)
7 changes: 4 additions & 3 deletions .github/actions/bump-formulas/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ runs:
# 1 * 60 * 24 = 1440 (because bump-pr will checkout a new branch and push to remote)
# 1 concurrent parallel jobs, 1 second delay between jobs.
run: |
parallel -j1 --delay 1s --group --halt now,fail=1 \
"./.github/actions/bump-formulas/script.sh {}" \
::: $(ls $(brew --repository brewforge/chinese)/Formula/*.rb | xargs -I {} basename {} .rb)
cat ./.github/actions/bump-formulas/script.sh
# parallel -j1 --delay 1s --group --halt now,fail=1 \
# "./.github/actions/bump-formulas/script.sh {}" \
# ::: $(ls $(brew --repository brewforge/chinese)/Formula/*.rb | xargs -I {} basename {} .rb)
4 changes: 4 additions & 0 deletions .github/actions/homebrew-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ runs:
cask: true
test-bot: false

# Homebrew/actions/setup-homebrew will checkout the main branch.
# re-checkout myself.
- uses: actions/checkout@v3

- name: Necessary clis
shell: bash
run: |
Expand Down
40 changes: 30 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: CI

on:
pull_request:
branches: [main]
# pull_request:
# branches: [main]
push:
branches: [fix-*]
schedule:
Expand All @@ -29,15 +29,25 @@ jobs:
# checkout myself.
- uses: actions/checkout@v3

- shell: bash
run: |
pwd
cat ./.github/actions/bump-casks/action.yml
- name: Homebrew env
uses: ./.github/actions/homebrew-env
with:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}

- name: Bump casks
uses: ./.github/actions/bump-casks
with:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
- shell: bash
run: |
pwd
cat ./.github/actions/bump-casks/action.yml
# - name: Bump casks
# uses: ./.github/actions/bump-casks
# with:
# HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}

formulas:
name: Bump Formulas in parallel
Expand All @@ -52,12 +62,22 @@ jobs:
# checkout myself.
- uses: actions/checkout@v3

- shell: bash
run: |
pwd
cat ./.github/actions/bump-formulas/action.yml
- name: Homebrew env
uses: ./.github/actions/homebrew-env
with:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}

- name: Bump formulas
uses: ./.github/actions/bump-formulas
with:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
- shell: bash
run: |
pwd
cat ./.github/actions/bump-formulas/action.yml
# - name: Bump formulas
# uses: ./.github/actions/bump-formulas
# with:
# HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}

0 comments on commit ad7ef12

Please sign in to comment.