Skip to content

Commit

Permalink
feat: create automate pr for release (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
apham0001 authored Dec 9, 2024
1 parent ab319fc commit d3c8225
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/dispath-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Dispatch Update Version

on:
repository_dispatch:
types: [update-version]

jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v4

- name: Extract tag name
run: echo "TAG_NAME=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV

- name: Update version in Ansible configuration
run: |
TAG_NAME="$(echo "${TAG_NAME}" | sed 's/^v//')"
sed -i -E 's|(image: obolnetwork/charon:\$\{CHARON_VERSION:-)v\.?[0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9\-]*}|\1v'"${TAG_NAME}"'}|' docker-compose.yml
sed -i -E 's|(image: obolnetwork/charon:\$\{CHARON_VERSION:-)v\.?[0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9\-]*}|\1v'"${TAG_NAME}"'}|' relay/docker-compose.yml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: main
branch: update-version-${{ env.TAG_NAME }}
title: "Update version to ${{ env.TAG_NAME }}"
body: "Automatically generated PR to update version to ${{ env.TAG_NAME }}"
commit-message: "Update version to ${{ env.TAG_NAME }}"
author-name: "obol-platform"
author-email: "[email protected]"

0 comments on commit d3c8225

Please sign in to comment.