mirror of
https://github.com/docker/setup-compose-action.git
synced 2026-02-01 12:54:58 +01:00
ci: fix update-dist workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
42
.github/workflows/update-dist.yml
vendored
42
.github/workflows/update-dist.yml
vendored
@@ -10,8 +10,6 @@ jobs:
|
|||||||
prepare:
|
prepare:
|
||||||
if: github.actor == 'dependabot[bot]'
|
if: github.actor == 'dependabot[bot]'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
|
||||||
token: ${{ steps.docker-read-app.outputs.token }}
|
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: GitHub auth token from GitHub App
|
name: GitHub auth token from GitHub App
|
||||||
@@ -21,15 +19,31 @@ jobs:
|
|||||||
app-id: ${{ secrets.GHACTIONS_REPO_WRITE_APP_ID }}
|
app-id: ${{ secrets.GHACTIONS_REPO_WRITE_APP_ID }}
|
||||||
private-key: ${{ secrets.GHACTIONS_REPO_WRITE_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.GHACTIONS_REPO_WRITE_APP_PRIVATE_KEY }}
|
||||||
owner: docker
|
owner: docker
|
||||||
|
-
|
||||||
update-dist:
|
name: Checkout
|
||||||
if: github.actor == 'dependabot[bot]'
|
uses: actions/checkout@v6
|
||||||
uses: docker/actions-toolkit/.github/workflows/action-dist-update.yml@action-dist-update
|
with:
|
||||||
needs:
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
- prepare
|
fetch-depth: 0
|
||||||
permissions:
|
token: ${{ steps.docker-read-app.outputs.token || github.token }}
|
||||||
contents: write
|
-
|
||||||
with:
|
name: Build
|
||||||
target: build
|
uses: docker/bake-action@v6
|
||||||
secrets:
|
with:
|
||||||
github-token: ${{ needs.prepare.outputs.token }}
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user