Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/action-dist-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# reusable workflow to build action and commit the updated dist/ folder using bake
name: action-dist-update

on:
workflow_call:
inputs:
target:
description: 'Bake target to build the action'
required: false
type: string
secrets:
github-token:
required: false

jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
-
name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
token: ${{ secrets.github-token || github.token }}
-
name: Build
uses: docker/bake-action@v6
with:
source: .
targets: ${{ inputs.bake-target }}
-
name: Commit and push dist
run: |
if [ -n "$(git status --porcelain -- dist)" ]; then
(
set -x
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add dist
git commit -m "chore: update generated content"
git push
)
else
echo "No changes in dist"
fi
Loading