forked from ObolNetwork/charon-distributed-validator-node
-
Notifications
You must be signed in to change notification settings - Fork 27
33 lines (27 loc) · 1.11 KB
/
dispath-update.yml
File metadata and controls
33 lines (27 loc) · 1.11 KB
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
29
30
31
32
33
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@v5
- 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
- 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: "platform@obol.tech"