v0.16.0 #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs-release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Git tag' | |
required: true | |
release: | |
types: | |
- released | |
jobs: | |
open-pr: | |
runs-on: ubuntu-24.04 | |
if: ${{ (github.event.release.prerelease != true || github.event.inputs.tag != '') && github.repository == 'docker/buildx' }} | |
steps: | |
- | |
name: Checkout docs repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GHPAT_DOCS_DISPATCH }} | |
repository: docker/docs | |
ref: main | |
- | |
name: Prepare | |
run: | | |
rm -rf ./data/buildx/* | |
if [ -n "${{ github.event.inputs.tag }}" ]; then | |
echo "RELEASE_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV | |
else | |
echo "RELEASE_NAME=${{ github.event.release.name }}" >> $GITHUB_ENV | |
fi | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Generate yaml | |
uses: docker/bake-action@v5 | |
with: | |
source: ${{ github.server_url }}/${{ github.repository }}.git#${{ env.RELEASE_NAME }} | |
targets: update-docs | |
provenance: false | |
set: | | |
*.output=/tmp/buildx-docs | |
env: | |
DOCS_FORMATS: yaml | |
- | |
name: Copy yaml | |
run: | | |
cp /tmp/buildx-docs/out/reference/*.yaml ./data/buildx/ | |
- | |
name: Update vendor | |
run: | | |
make vendor | |
env: | |
VENDOR_MODULE: github.com/docker/buildx@${{ env.RELEASE_NAME }} | |
- | |
name: Create PR on docs repo | |
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 | |
with: | |
token: ${{ secrets.GHPAT_DOCS_DISPATCH }} | |
push-to-fork: docker-tools-robot/docker.github.io | |
commit-message: "vendor: github.com/docker/buildx ${{ env.RELEASE_NAME }}" | |
signoff: true | |
branch: dispatch/buildx-ref-${{ env.RELEASE_NAME }} | |
delete-branch: true | |
title: Update buildx reference to ${{ env.RELEASE_NAME }} | |
body: | | |
Update the buildx reference documentation to keep in sync with the latest release `${{ env.RELEASE_NAME }}` | |
draft: false |