-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from importhuman/update-default-version
Add workflow to update default pack version
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: update-pack-version | ||
|
||
on: | ||
repository_dispatch: | ||
types: | ||
- pack-release | ||
|
||
jobs: | ||
update-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update pack version of buildpacks/github-actions/setup-pack/action.yml on new pack release | ||
uses: actions/checkout@v2 | ||
run: | | ||
NEW_VERSION = $(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/buildpacks/pack/releases/latest | jq .tag_name -r | cut -c 2-) | ||
sed -i -z "s/default: '[0-9]\{1,\}.[0-9]\{1,\}.[0-9]\{1,\}'/default: '$NEW_VERSION'/2" setup-pack/action.yml | ||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }} | ||
commit-message: Update version to latest release of buildpacks/pack | ||
title: Update default version of setup-pack/action.yml | ||
body: Updates default version of setup-pack/action.yml to reflect release changes in buildpacks/pack | ||
branch: update-version | ||
base: main | ||
signoff: true |