mirror of
https://github.com/Koenkk/zigbee-OTA.git
synced 2026-06-24 13:18:14 +00:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
72 lines
2.6 KiB
YAML
72 lines
2.6 KiB
YAML
name: Re-Process All Images
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
remove_not_in_manifest:
|
|
description: 'Remove images not found in manifest (if false, will be moved to separate dir instead).'
|
|
required: true
|
|
default: false
|
|
type: boolean
|
|
# skip_download_third_parties:
|
|
# description: 'Skip the step that downloads firmware with 3rd party URLs in manifest.'
|
|
# required: true
|
|
# default: true
|
|
# type: boolean
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
reprocess-all-images:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: pnpm/action-setup@v5
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
registry-url: https://registry.npmjs.org/
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm i --frozen-lockfile
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: Create and checkout new branch
|
|
id: create_branch
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
branch_name="reprocess-$(date +'%Y-%m-%d-%H-%M-%S')"
|
|
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
|
|
git checkout -b $branch_name
|
|
|
|
- name: Reprocess
|
|
uses: actions/github-script@v9
|
|
env:
|
|
NODE_EXTRA_CA_CERTS: cacerts.pem
|
|
with:
|
|
script: |
|
|
const {reProcessAllImages} = await import("${{ github.workspace }}/dist/ghw_reprocess_all_images.js")
|
|
|
|
await reProcessAllImages(github, core, context, ${{ fromJSON(inputs.remove_not_in_manifest) }}, true)
|
|
|
|
- name: Commit changes in new branch
|
|
run: |
|
|
git add .
|
|
git commit -m "Re-Processed all images" || echo 'Nothing to commit'
|
|
git push -u origin HEAD
|
|
|
|
- name: Create pull request
|
|
uses: actions/github-script@v9
|
|
with:
|
|
script: |
|
|
const {createPRToDefault} = await import("${{ github.workspace }}/dist/ghw_create_pr_to_default.js")
|
|
|
|
await createPRToDefault(github, core, context, "${{steps.create_branch.outputs.branch_name}}", "Re-Processed all images")
|