pack-release #27
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
name: update-pack-version | |
on: | |
repository_dispatch: | |
types: | |
- pack-release | |
workflow_dispatch: | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Update pack version of buildpacks/pack-orb/src/@orb.yml on new pack release | |
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 's/default: [0-9]\{1,\}.[0-9]\{1,\}.[0-9]\{1,\}/default: '"${NEW_VERSION}"'/g' src/@orb.yml | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v3.10.0 | |
with: | |
token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }} | |
commit-message: Update version to latest release of buildpacks/pack | |
title: Update default version of @orb.yml | |
body: Updates default version of @orb.yml to reflect release changes in buildpacks/pack | |
branch: update-version | |
base: main | |
signoff: true |