ci: run the bump workflow on Gitea Actions
The tap moved to git.trivk.dev. Gitea Runner has no parallel steps, so the two bumps run one after the other. The scripts ask api.github.com with curl instead of gh, which needs a GitHub token the Gitea job does not have; two unauthenticated requests per run stay far under the limit. The README now taps with the git.trivk.dev URL.
This commit is contained in:
1 parent
a573d6948f
commit
07026e2c7a
4 files changed
+13
-12
No files matched your search
@@ -4,7 +4,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cask=Casks/netbird-ui.rb
|
cask=Casks/netbird-ui.rb
|
||||||
formula=Formula/netbird.rb
|
formula=Formula/netbird.rb
|
||||||
latest=$(gh api repos/netbirdio/netbird/releases/latest --jq .tag_name)
|
latest=$(curl -fsSL https://api.github.com/repos/netbirdio/netbird/releases/latest | jq -r .tag_name)
|
||||||
latest=${latest#v}
|
latest=${latest#v}
|
||||||
current=$(sed -nE 's/^ version "([^"]+)"$/\1/p' "$cask")
|
current=$(sed -nE 's/^ version "([^"]+)"$/\1/p' "$cask")
|
||||||
if [ "$latest" = "$current" ]; then
|
if [ "$latest" = "$current" ]; then
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
formula=Formula/zshellcheck.rb
|
formula=Formula/zshellcheck.rb
|
||||||
repo=afadesigns/zshellcheck
|
repo=afadesigns/zshellcheck
|
||||||
latest=$(gh api repos/$repo/releases/latest --jq .tag_name)
|
latest=$(curl -fsSL "https://api.github.com/repos/$repo/releases/latest" | jq -r .tag_name)
|
||||||
latest=${latest#v}
|
latest=${latest#v}
|
||||||
current=$(sed -nE 's|.*/releases/download/v([^/]+)/.*|\1|p' "$formula" | head -1)
|
current=$(sed -nE 's|.*/releases/download/v([^/]+)/.*|\1|p' "$formula" | head -1)
|
||||||
if [ "$latest" = "$current" ]; then
|
if [ "$latest" = "$current" ]; then
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
bump:
|
bump:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
@@ -20,9 +18,9 @@ jobs:
|
|||||||
echo "BUMP_DIR=$RUNNER_TEMP/bumps" >> "$GITHUB_ENV"
|
echo "BUMP_DIR=$RUNNER_TEMP/bumps" >> "$GITHUB_ENV"
|
||||||
mkdir -p "$RUNNER_TEMP/bumps"
|
mkdir -p "$RUNNER_TEMP/bumps"
|
||||||
|
|
||||||
# Each script edits its own files and leaves committing to the next step,
|
# Each script edits its own files and leaves committing to the last step, so every bump
|
||||||
# so the parallel steps never race for the git index.
|
# gets its own commit. The scripts ask api.github.com without a token: two requests per run
|
||||||
- parallel:
|
# is far below the 60 an hour GitHub allows per IP.
|
||||||
- name: Bump netbird
|
- name: Bump netbird
|
||||||
run: .github/scripts/bump-netbird.sh
|
run: .github/scripts/bump-netbird.sh
|
||||||
|
|
||||||
@@ -32,8 +30,8 @@ jobs:
|
|||||||
- name: Commit and push
|
- name: Commit and push
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "gitea-actions"
|
||||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config user.email "gitea-actions@git.trivk.dev"
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
for record in "$BUMP_DIR"/*; do
|
for record in "$BUMP_DIR"/*; do
|
||||||
mapfile -t lines < "$record"
|
mapfile -t lines < "$record"
|
||||||
|
|||||||
@@ -11,15 +11,18 @@ My personal Homebrew tap for macOS.
|
|||||||
## Install
|
## Install
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew tap vokhactri/tap
|
brew tap vokhactri/tap https://git.trivk.dev/tri/homebrew-tap.git
|
||||||
brew trust vokhactri/tap
|
brew trust vokhactri/tap
|
||||||
brew install vokhactri/tap/<name>
|
brew install vokhactri/tap/<name>
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `brew install --cask` for casks.
|
Use `brew install --cask` for casks.
|
||||||
|
|
||||||
|
The tap lives on git.trivk.dev, so `brew tap` needs the URL. Without it, Homebrew looks on GitHub,
|
||||||
|
where the old copy is archived and no longer updated.
|
||||||
|
|
||||||
## Updates
|
## Updates
|
||||||
|
|
||||||
A GitHub Action checks for new upstream releases every two hours and commits the new version
|
A Gitea Actions workflow checks for new upstream releases every two hours and commits the new
|
||||||
and sha256 values. If a release doesn't have its macOS files yet, the Action tries again on the
|
version and sha256 values. If a release doesn't have its macOS files yet, the Action tries again on the
|
||||||
next run.
|
next run.
|
||||||
Reference in new issue
Block a user