Skip to content

Commit

Permalink
Update pipeline-builder (#226)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Mikusa <dan@mikusa.com>
  • Loading branch information
dmikusa authored Apr 12, 2023
1 parent 09cee45 commit 8b7f797
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ updates:
directory: /
schedule:
interval: daily
ignore:
- dependency-name: github.com/onsi/gomega
labels:
- semver:patch
- type:dependency-upgrade
15 changes: 15 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,18 @@
- name: type:task
description: A general task
color: e3d9fc
- name: type:informational
description: Provides information or notice to the community
color: e3d9fc
- name: type:poll
description: Request for feedback from the community
color: e3d9fc
- name: note:ideal-for-contribution
description: An issue that a contributor can help us with
color: 54f7a8
- name: note:on-hold
description: We can't start working on this issue yet
color: 54f7a8
- name: note:good-first-issue
description: A good first issue to get started with
color: 54f7a8
2 changes: 1 addition & 1 deletion .github/pipeline-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.25.2
1.32.0
4 changes: 2 additions & 2 deletions .github/workflows/pb-minimal-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v2
- uses: mheap/github-action-required-labels@v4
with:
count: 1
labels: semver:major, semver:minor, semver:patch
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v2
- uses: mheap/github-action-required-labels@v4
with:
count: 1
labels: type:bug, type:dependency-upgrade, type:documentation, type:enhancement, type:question, type:task
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/pb-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Tests
"on":
merge_group:
types:
- checks_requested
branches:
- main
pull_request: {}
push:
branches:
Expand All @@ -16,9 +21,9 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
path: ${{ env.HOME }}/go/pkg/mod
restore-keys: ${{ runner.os }}-go-
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
- name: Install richgo
run: |
#!/usr/bin/env bash
Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/pb-update-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
- uses: actions/checkout@v3
- name: Update Go Version
- name: Update Go Version & Modules
id: update-go
run: |
#!/usr/bin/env bash
Expand All @@ -35,27 +35,38 @@ jobs:
git add go.mod go.sum
git checkout -- .
echo "::set-output name=old-go-version::${OLD_GO_VERSION}"
echo "::set-output name=go-version::${GO_VERSION}"
if [ "$OLD_GO_VERSION" == "$GO_VERSION" ]; then
COMMIT_TITLE="Bump Go Modules"
COMMIT_BODY="Bumps Go modules used by the project. See the commit for details on what modules were updated."
COMMIT_SEMVER="semver:patch"
else
COMMIT_TITLE="Bump Go from ${OLD_GO_VERSION} to ${GO_VERSION}"
COMMIT_BODY="Bumps Go from ${OLD_GO_VERSION} to ${GO_VERSION} and update Go modules used by the project. See the commit for details on what modules were updated."
COMMIT_SEMVER="semver:minor"
fi
echo "commit-title=${COMMIT_TITLE}" >> "$GITHUB_OUTPUT"
echo "commit-body=${COMMIT_BODY}" >> "$GITHUB_OUTPUT"
echo "commit-semver=${COMMIT_SEMVER}" >> "$GITHUB_OUTPUT"
env:
GO_VERSION: "1.18"
- uses: peter-evans/create-pull-request@v4
GO_VERSION: "1.20"
- uses: peter-evans/create-pull-request@v5
with:
author: ${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }} <${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }}@users.noreply.github.com>
body: |-
Bumps Go from `${{ steps.update-go.outputs.old-go-version }}` to `${{ steps.update-go.outputs.go-version }}`.
${{ steps.update-go.outputs.commit-body }}
<details>
<summary>Release Notes</summary>
${{ steps.pipeline.outputs.release-notes }}
</details>
branch: update/go
commit-message: |-
Bump Go from ${{ steps.update-go.outputs.old-go-version }} to ${{ steps.update-go.outputs.go-version }}
${{ steps.update-go.outputs.commit-title }}
Bumps Go from ${{ steps.update-go.outputs.old-go-version }} to ${{ steps.update-go.outputs.go-version }}.
${{ steps.update-go.outputs.commit-body }}
delete-branch: true
labels: semver:minor, type:task
labels: ${{ steps.update-go.outputs.commit-semver }}, type:task
signoff: true
title: Bump Go from ${{ steps.update-go.outputs.old-go-version }} to ${{ steps.update-go.outputs.go-version }}
title: ${{ steps.update-go.outputs.commit-title }}
token: ${{ secrets.IMPLEMENTATION_GITHUB_TOKEN }}
14 changes: 8 additions & 6 deletions .github/workflows/pb-update-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
- name: Install octo
run: |
#!/usr/bin/env bash
Expand Down Expand Up @@ -57,13 +57,15 @@ jobs:
git add .github/
git checkout -- .
echo "::set-output name=old-version::${OLD_VERSION}"
echo "::set-output name=new-version::${NEW_VERSION}"
echo "::set-output name=release-notes::${RELEASE_NOTES//$'\n'/%0A}"
echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT"
echo "new-version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
DELIMITER=$(openssl rand -hex 16) # roughly the same entropy as uuid v4 used in https://github.com/actions/toolkit/blob/b36e70495fbee083eb20f600eafa9091d832577d/packages/core/src/file-command.ts#L28
printf "release-notes<<%s\n%s\n%s\n" "${DELIMITER}" "${RELEASE_NOTES}" "${DELIMITER}" >> "${GITHUB_OUTPUT}" # see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
env:
DESCRIPTOR: .github/pipeline-descriptor.yml
GITHUB_TOKEN: ${{ secrets.IMPLEMENTATION_GITHUB_TOKEN }}
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
author: ${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }} <${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }}@users.noreply.github.com>
body: |-
Expand Down

0 comments on commit 8b7f797

Please sign in to comment.