Skip to content

update-phcode-build

update-phcode-build #8

name: Update phcode to latest from tauri branch in phcode repo
# Aim: Update 'tauri' branch from phcode repo
# Process:
# 1. The 'tauri' repository, branch, and commit information are stored in the 'package.json' file in this repository.
# 2. This action creates a pull request to update its commit ID and versions of phcode to ensure build consistency.
on:
repository_dispatch:
types: [update-phcode-build]
jobs:
build-tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Event triggered by
run: |
echo source: ${{github.event.client_payload.source}}, workflow: ${{github.event.client_payload.workflow}}, action_run_id: ${{github.event.client_payload.run_id}}, action_run_number: ${{github.event.client_payload.run_number}}, sha: ${{ github.event.client_payload.sha }}, github_ref: ${{ github.event.client_payload.ref }}
- name: setup node
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Update phcode and version
run: |
npm install
npm run _ci-update-phcode-build ${{ github.event.client_payload.sha }}
git status
phoenix_version=`node -p "require('./package.json').version"`
echo "PHOENIX_VERSION=${phoenix_version}" >> $GITHUB_ENV
shell: bash
- name: Create phcode patch update Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'ci: update phcode version to ${{ env.PHOENIX_VERSION }}'
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: '[Release BOT] update phcode version to ${{ env.PHOENIX_VERSION }}'
add-paths: |
package.json
src-tauri/Cargo.toml
src-tauri/tauri.conf.json
body: |
A new version of phcode has been pushed to `${{github.event.client_payload.source}}` repo's `tauri` branch.
This pull request updates the dependency to bring in the latest changes to phcode.
- version being mereged is ${{ env.PHOENIX_VERSION }}
- Auto-generated by `update-phcode-build.yml` action
- commit hash being merged in is [${{ github.event.client_payload.sha }}](https://github.com/phcode-dev/phoenix/tree/${{ github.event.client_payload.sha }})
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"