Skip to content

Commit f361570

Browse files
adityamaruCodesmith
andcommitted
ci: add temporary workflow to rebuild dist with BUF_TOKEN
Co-authored-by: Codesmith <codesmith@blacksmith.sh>
1 parent ae1f720 commit f361570

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/rebuild-dist.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Rebuild Dist
2+
3+
on:
4+
push:
5+
branches:
6+
- fix/fallback-docker-container-driver
7+
8+
jobs:
9+
rebuild-dist:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
ref: fix/fallback-docker-container-driver
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: "20"
21+
22+
- uses: pnpm/action-setup@v4
23+
with:
24+
version: 8.15.9
25+
26+
- uses: bufbuild/buf-setup-action@v1
27+
with:
28+
github_token: ${{ github.token }}
29+
30+
- name: Configure npm for buf registry
31+
env:
32+
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
33+
run: |
34+
npm config set @buf:registry https://buf.build/gen/npm/v1/
35+
npm config set //buf.build/gen/npm/v1/:_authToken $BUF_TOKEN
36+
37+
- name: Install dependencies
38+
run: pnpm install
39+
40+
- name: Build
41+
run: pnpm run build
42+
43+
- name: Commit and push dist
44+
run: |
45+
git config user.name "github-actions[bot]"
46+
git config user.email "github-actions[bot]@users.noreply.github.com"
47+
git add dist/
48+
if git diff --cached --quiet; then
49+
echo "No changes to commit"
50+
else
51+
git commit -m "build: rebuild dist"
52+
git push
53+
fi

0 commit comments

Comments
 (0)