Skip to content

Commit

Permalink
Bump pipeline from 1.23.0 to 1.25.2
Browse files Browse the repository at this point in the history
Bumps pipeline from 1.23.0 to 1.25.2.

Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
buildpack-bot authored Aug 18, 2022
1 parent 4b96ab8 commit 5bd6cda
Show file tree
Hide file tree
Showing 7 changed files with 257 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/pipeline-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.0
1.25.2
29 changes: 29 additions & 0 deletions .github/workflows/pb-minimal-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Minimal Labels
"on":
pull_request:
types:
- synchronize
- reopened
- labeled
- unlabeled
jobs:
semver:
name: Minimal Semver Labels
runs-on:
- ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v2
with:
count: 1
labels: semver:major, semver:minor, semver:patch
mode: exactly
type:
name: Minimal Type Labels
runs-on:
- ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v2
with:
count: 1
labels: type:bug, type:dependency-upgrade, type:documentation, type:enhancement, type:question, type:task
mode: exactly
17 changes: 17 additions & 0 deletions .github/workflows/pb-synchronize-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Synchronize Labels
"on":
push:
branches:
- main
paths:
- .github/labels.yml
jobs:
synchronize:
name: Synchronize Labels
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: micnncim/action-label-syncer@v1
env:
GITHUB_TOKEN: ${{ secrets.IMPLEMENTATION_GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/pb-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests
"on":
pull_request: {}
push:
branches:
- main
jobs:
unit:
name: Unit Test
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
path: ${{ env.HOME }}/go/pkg/mod
restore-keys: ${{ runner.os }}-go-
- uses: actions/setup-go@v3
with:
go-version: "1.18"
- name: Install richgo
run: |
#!/usr/bin/env bash
set -euo pipefail
echo "Installing richgo ${RICHGO_VERSION}"
mkdir -p "${HOME}"/bin
echo "${HOME}/bin" >> "${GITHUB_PATH}"
curl \
--location \
--show-error \
--silent \
"https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \
| tar -C "${HOME}"/bin -xz richgo
env:
RICHGO_VERSION: 0.3.10
- name: Run Tests
run: |
#!/usr/bin/env bash
set -euo pipefail
GOCMD=richgo make
env:
RICHGO_FORCE_COLOR: "1"
15 changes: 15 additions & 0 deletions .github/workflows/pb-update-draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Update Draft Release
"on":
push:
branches:
- main
jobs:
update:
name: Update Draft Release
runs-on:
- ubuntu-latest
steps:
- id: release-drafter
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.IMPLEMENTATION_GITHUB_TOKEN }}
61 changes: 61 additions & 0 deletions .github/workflows/pb-update-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Update Go
"on":
schedule:
- cron: 0 2 * * 1
workflow_dispatch: {}
jobs:
update:
name: Update Go
runs-on:
- ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.18"
- uses: actions/checkout@v3
- name: Update Go Version
id: update-go
run: |
#!/usr/bin/env bash
set -euo pipefail
if [ -z "${GO_VERSION:-}" ]; then
echo "No go version set"
exit 1
fi
OLD_GO_VERSION=$(grep -P '^go \d\.\d+' go.mod | cut -d ' ' -f 2)
go mod edit -go="$GO_VERSION"
go mod tidy
go get -u all
go mod tidy
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}"
env:
GO_VERSION: "1.18"
- uses: peter-evans/create-pull-request@v4
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 }}`.
<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 }}
Bumps Go from ${{ steps.update-go.outputs.old-go-version }} to ${{ steps.update-go.outputs.go-version }}.
delete-branch: true
labels: semver:minor, type:task
signoff: true
title: Bump Go from ${{ steps.update-go.outputs.old-go-version }} to ${{ steps.update-go.outputs.go-version }}
token: ${{ secrets.IMPLEMENTATION_GITHUB_TOKEN }}
85 changes: 85 additions & 0 deletions .github/workflows/pb-update-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Update Pipeline
"on":
push:
branches:
- main
paths:
- .github/pipeline-descriptor.yml
schedule:
- cron: 0 5 * * 1-5
workflow_dispatch: {}
jobs:
update:
name: Update Pipeline
runs-on:
- ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.18"
- name: Install octo
run: |
#!/usr/bin/env bash
set -euo pipefail
go install -ldflags="-s -w" github.com/paketo-buildpacks/pipeline-builder/cmd/octo@latest
- uses: actions/checkout@v3
- name: Update Pipeline
id: pipeline
run: |
#!/usr/bin/env bash
set -euo pipefail
if [[ -f .github/pipeline-version ]]; then
OLD_VERSION=$(cat .github/pipeline-version)
else
OLD_VERSION="0.0.0"
fi
rm .github/workflows/pb-*.yml || true
octo --descriptor "${DESCRIPTOR}"
PAYLOAD=$(gh api /repos/paketo-buildpacks/pipeline-builder/releases/latest)
NEW_VERSION=$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.name')
echo "${NEW_VERSION}" > .github/pipeline-version
RELEASE_NOTES=$(
gh api \
-F text="$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.body')" \
-F mode="gfm" \
-F context="paketo-buildpacks/pipeline-builder" \
-X POST /markdown
)
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}"
env:
DESCRIPTOR: .github/pipeline-descriptor.yml
GITHUB_TOKEN: ${{ secrets.IMPLEMENTATION_GITHUB_TOKEN }}
- uses: peter-evans/create-pull-request@v4
with:
author: ${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }} <${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }}@users.noreply.github.com>
body: |-
Bumps pipeline from `${{ steps.pipeline.outputs.old-version }}` to `${{ steps.pipeline.outputs.new-version }}`.
<details>
<summary>Release Notes</summary>
${{ steps.pipeline.outputs.release-notes }}
</details>
branch: update/pipeline
commit-message: |-
Bump pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }}
Bumps pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }}.
delete-branch: true
labels: semver:patch, type:task
signoff: true
title: Bump pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }}
token: ${{ secrets.IMPLEMENTATION_GITHUB_TOKEN }}

0 comments on commit 5bd6cda

Please sign in to comment.