Skip to content

Commit

Permalink
feat(ci): sync with template module
Browse files Browse the repository at this point in the history
  • Loading branch information
RossComputerGuy committed Jan 28, 2024
1 parent 96e3d0c commit d235bd1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- master
- update-phantom/*
pull_request:
branches:
- master
- update-phantom/*
tags:
- "v*.*.*"

Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/update-phantom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- cron: '0 0 * * *'
workflow_dispatch: {}

permissions:
pull-requests: write
contents: write

jobs:
update-phantom:
runs-on: ubuntu-latest
Expand All @@ -20,8 +24,10 @@ jobs:
- name: Update Phantom UI
run: |
export PHANTOM_SHA=$(git -C phantom-core rev-parse HEAD)
export PHANTOM_SHA_SHORT=$(echo "$PHANTOM_SHA" | cut -c 1-6)
echo "PHANTOM_SHA=$PHANTOM_SHA" >> $GITHUB_ENV
echo "PHANTOM_SHA_SHORT=$PHANTOM_SHA_SHORT" >> $GITHUB_ENV
pushd main
git switch -c update-phantom/$PHANTOM_SHA
zig fetch --save=phantom https://github.com/PhantomUIx/core/archive/$PHANTOM_SHA.tar.gz
git config user.name "GitHub Actions Bot"
git config user.email "<>"
Expand All @@ -32,11 +38,12 @@ jobs:
else
export HAS_CHANGES=no
fi
echo "HAS_CHANGES=$HAS_CHANGES" >> $GITHUB_ENV
popd
- name: Open PR
uses: peter-evans/create-pull-request@v5
if: env.HAS_CHANGES == 'yes'
if: ${{ env.HAS_CHANGES == 'yes' }}
with:
title: "Update Phantom UI core to ${{ env.PHANTOM_SHA }}"
branch: update-phantom/${{ env.PHANTOM_SHA }}
branch: update-phantom/${{ env.PHANTOM_SHA_SHORT }}
path: main

0 comments on commit d235bd1

Please sign in to comment.