-
Notifications
You must be signed in to change notification settings - Fork 7
28 lines (28 loc) · 1.61 KB
/
update-version-on-release-ga.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Repository Dispatch on release of buildpacks/github-actions
on:
repository_dispatch:
types: [release-event]
workflow_dispatch: {}
jobs:
myEvent:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update Version of buildpacks/github-actions
run: |
NEW_VERSION=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/buildpacks/github-actions/releases/latest | jq .name -r)
sed -i 's/compute-metadata:[0-9].[0-9].[0-9]/compute-metadata:'"$NEW_VERSION"'/g' .github/workflows/register-buildpack.yml
sed -i 's/verify-namespace-owner:[0-9].[0-9].[0-9]/verify-namespace-owner:'"$NEW_VERSION"'/g' .github/workflows/register-buildpack.yml
sed -i 's/verify-metadata:[0-9].[0-9].[0-9]/verify-metadata:'"$NEW_VERSION"'/g' .github/workflows/register-buildpack.yml
sed -i 's/add-entry:[0-9].[0-9].[0-9]/add-entry:'"$NEW_VERSION"'/g' .github/workflows/register-buildpack.yml
sed -i 's/yank-entry:[0-9].[0-9].[0-9]/yank-entry:'"$NEW_VERSION"'/g' .github/workflows/register-buildpack.yml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
commit-message: update version to latest release of buildpacks/github-actions
title: Update Version of buildpacks/github-actions
body: Updates version of buildpacks/github-actions to reflect release changes in workflows of buildpacks/registry-index
branch: update-version
base: main
signoff: true