Skip to content

Commit

Permalink
ci: fix docs-release workflow
Browse files Browse the repository at this point in the history
Automatically create PR for updating docs on release

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
  • Loading branch information
dvdksn committed Feb 29, 2024
1 parent e273a53 commit 682b364
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ jobs:
name: Prepare
run: |
rm -rf ./_data/buildx/*
rm -rf ./_vendor/github.com/docker/buildx
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build docs
name: Generate yaml
uses: docker/bake-action@v4
with:
source: ${{ github.server_url }}/${{ github.repository }}.git#${{ github.event.release.name }}
Expand All @@ -35,9 +36,17 @@ jobs:
env:
DOCS_FORMATS: yaml
-
name: Copy files
name: Copy yaml
run: |
cp /tmp/buildx-docs/out/reference/*.yaml ./_data/buildx/
-
name: Update vendor
uses: docker/bake-action@v4
with:
source: ${{ github.server_url }}/${{ github.repository }}.git#${{ github.event.release.name }}
targets: vendor
set: |
vendor.args.MODULE=github.com/docker/buildx@${{ github.event.release.name }}
-
name: Commit changes
run: |
Expand All @@ -47,8 +56,7 @@ jobs:
uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc
with:
token: ${{ secrets.GHPAT_DOCS_DISPATCH }}
push-to-fork: docker-tools-robot/docker.github.io
commit-message: "build: update buildx reference to ${{ github.event.release.name }}"
commit-message: "vendor: github.com/docker/buildx ${{ github.event.release.name }}"
signoff: true
branch: dispatch/buildx-ref-${{ github.event.release.name }}
delete-branch: true
Expand Down

0 comments on commit 682b364

Please sign in to comment.