Skip to content

Commit

Permalink
Merge pull request #74 from importhuman/update-default-version
Browse files Browse the repository at this point in the history
Add workflow to update default pack version
  • Loading branch information
jkutner authored Aug 20, 2021
2 parents 353f851 + 07e3204 commit 78c9877
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/update-version.yml
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

0 comments on commit 78c9877

Please sign in to comment.