Skip to content

Commit 1e613db

Browse files
feat(ci): sync with template module
1 parent 0435ab3 commit 1e613db

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
branches:
66
- master
7+
- update-phantom/*
78
pull_request:
89
branches:
910
- master
11+
- update-phantom/*
1012
tags:
1113
- "v*.*.*"
1214

.github/workflows/update-phantom.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
- cron: '0 0 * * *'
66
workflow_dispatch: {}
77

8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
812
jobs:
913
update-phantom:
1014
runs-on: ubuntu-latest
@@ -20,8 +24,10 @@ jobs:
2024
- name: Update Phantom UI
2125
run: |
2226
export PHANTOM_SHA=$(git -C phantom-core rev-parse HEAD)
27+
export PHANTOM_SHA_SHORT=$(echo "$PHANTOM_SHA" | cut -c 1-6)
28+
echo "PHANTOM_SHA=$PHANTOM_SHA" >> $GITHUB_ENV
29+
echo "PHANTOM_SHA_SHORT=$PHANTOM_SHA_SHORT" >> $GITHUB_ENV
2330
pushd main
24-
git switch -c update-phantom/$PHANTOM_SHA
2531
zig fetch --save=phantom https://github.com/PhantomUIx/core/archive/$PHANTOM_SHA.tar.gz
2632
git config user.name "GitHub Actions Bot"
2733
git config user.email "<>"
@@ -32,11 +38,12 @@ jobs:
3238
else
3339
export HAS_CHANGES=no
3440
fi
41+
echo "HAS_CHANGES=$HAS_CHANGES" >> $GITHUB_ENV
3542
popd
3643
- name: Open PR
3744
uses: peter-evans/create-pull-request@v5
38-
if: env.HAS_CHANGES == 'yes'
45+
if: ${{ env.HAS_CHANGES == 'yes' }}
3946
with:
4047
title: "Update Phantom UI core to ${{ env.PHANTOM_SHA }}"
41-
branch: update-phantom/${{ env.PHANTOM_SHA }}
48+
branch: update-phantom/${{ env.PHANTOM_SHA_SHORT }}
4249
path: main

0 commit comments

Comments
 (0)