From accf68ac23f0cc5f37e7c80e5d078336217682b9 Mon Sep 17 00:00:00 2001 From: qu1queee Date: Sun, 13 Jun 2021 23:55:53 +0200 Subject: [PATCH 1/2] Add CI for README updates This will open a new PR based on README updates. It will update docs to point out to the latest available tag. --- .github/workflows/release.yaml | 48 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 49 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 727593e398..33b47c605e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -57,3 +57,51 @@ jobs: run: | make release gh release upload ${TAG} release.yaml + + - name: Update docs after release creation + env: + PREVIOUS_TAG: ${{ github.event.inputs.tags }} + NEW_TAG: ${{ github.event.inputs.release }} + run: | + # Update README.md with new tag + + sed -i 's#https://github.com/shipwright-io/build/releases/download/'"$PREVIOUS_TAG"'/release.yaml#https://github.com/shipwright-io/build/releases/download/'"$NEW_TAG"'/release.yaml#g' README.md + sed -i '/Examples @ HEAD/a | ['"$NEW_TAG"'](https://github.com/shipwright-io/build/releases/tag/'"$NEW_TAG"') | [Docs @ '"$NEW_TAG"'](https://github.com/shipwright-io/build/tree/'"$NEW_TAG"'/docs) | [Examples @ '"$NEW_TAG"'](https://github.com/shipwright-io/build/tree/'"$NEW_TAG"'/samples) |' README.md + + - name: Create Readme commits + run: | + git config user.name ${{ github.actor }} + git config user.email ${{ github.actor }}@users.noreply.github.com + git add README.md + git commit -m "Update Readme with new Tag ${{ github.event.inputs.release }}" + git clean -f + - name: Create Readme PR + uses: peter-evans/create-pull-request@v3 + with: + commit-message: Update Readme with new Tag + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: false + labels: | + kind/documentation + branch: update-readme-tag-refs + delete-branch: true + title: 'Update Readme with new tag' + body: | + Update README.md + # Changes + + - Bump tag references to ${{ github.event.inputs.release }} + + # Submitter Checklist + + - [ ] Includes tests if functionality changed/was added + - [x] Includes docs if changes are user-facing + - [x] [Set a kind label on this PR](https://prow.k8s.io/command-help#kind) + - [x] Release notes block has been filled in, or marked NONE + + # Release Notes + + ```release-note + None + ``` + draft: false diff --git a/.gitignore b/.gitignore index 8fa45302f5..0aad1eb154 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ git shipwright-build-controller build/_output build/_test +hub-linux-* # Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode ### Emacs ### # -*- mode: gitignore; -*- From 77b3a799240915e650a20173acc9a53908e29dc9 Mon Sep 17 00:00:00 2001 From: Enrique Encalada Date: Thu, 17 Jun 2021 13:53:04 +0200 Subject: [PATCH 2/2] Update .github/workflows/release.yaml Co-authored-by: Sascha Schwarze --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 33b47c605e..f85ed66bd9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -76,7 +76,7 @@ jobs: git commit -m "Update Readme with new Tag ${{ github.event.inputs.release }}" git clean -f - name: Create Readme PR - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@9825ae65b1cb54b543b938503728b432a0176d29 with: commit-message: Update Readme with new Tag author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>