From 018a8a74ba0581db28f83ef1011dbc8a95d2b8ad Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:24:38 +0100 Subject: [PATCH] ci: fix update-dist workflow Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/update-dist.yml | 42 ++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/update-dist.yml b/.github/workflows/update-dist.yml index b421130..b62b993 100644 --- a/.github/workflows/update-dist.yml +++ b/.github/workflows/update-dist.yml @@ -10,8 +10,6 @@ jobs: prepare: if: github.actor == 'dependabot[bot]' runs-on: ubuntu-latest - outputs: - token: ${{ steps.docker-read-app.outputs.token }} steps: - name: GitHub auth token from GitHub App @@ -21,15 +19,31 @@ jobs: app-id: ${{ secrets.GHACTIONS_REPO_WRITE_APP_ID }} private-key: ${{ secrets.GHACTIONS_REPO_WRITE_APP_PRIVATE_KEY }} owner: docker - - update-dist: - if: github.actor == 'dependabot[bot]' - uses: docker/actions-toolkit/.github/workflows/action-dist-update.yml@action-dist-update - needs: - - prepare - permissions: - contents: write - with: - target: build - secrets: - github-token: ${{ needs.prepare.outputs.token }} + - + name: Checkout + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + token: ${{ steps.docker-read-app.outputs.token || github.token }} + - + name: Build + uses: docker/bake-action@v6 + with: + source: . + targets: build + - + 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