Skip to content

Commit b7a1d6f

Browse files
authored
feat: auto release (#100)
1 parent 47fb825 commit b7a1d6f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Dispatch Update Version
2+
3+
on:
4+
repository_dispatch:
5+
types: [update-version]
6+
7+
jobs:
8+
update-version:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout this repository
12+
uses: actions/checkout@v4
13+
14+
- name: Extract tag name
15+
run: echo "TAG_NAME=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV
16+
17+
- name: Update version in Ansible configuration
18+
run: |
19+
TAG_NAME="$(echo "${TAG_NAME}" | sed 's/^v//')"
20+
21+
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
22+
23+
- name: Create Pull Request
24+
uses: peter-evans/create-pull-request@v7
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
base: main
28+
branch: update-version-${{ env.TAG_NAME }}
29+
title: "Update version to ${{ env.TAG_NAME }}"
30+
body: "Automatically generated PR to update version to ${{ env.TAG_NAME }}"
31+
commit-message: "Update version to ${{ env.TAG_NAME }}"
32+
author-name: "obol-platform"
33+
author-email: "[email protected]"

0 commit comments

Comments
 (0)