forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (42 loc) · 1.89 KB
/
Copy pathupdate-cpp-lib.yml
File metadata and controls
44 lines (42 loc) · 1.89 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
34
35
36
37
38
39
40
41
42
43
44
name: Update veriblock-pop-cpp
on:
repository_dispatch:
types: update
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Download and get SHA256 hash of latest veriblock-pop-cpp commit.
run: |
wget -q https://github.com/VeriBlock/alt-integration-cpp/archive/${{ github.event.client_payload.sha }}.tar.gz
echo "SHA256=$(cut -d " " -f1 <<< "$(sha256sum "${{ github.event.client_payload.sha }}.tar.gz")")" >> $GITHUB_ENV
- name: Get current version and SHA256 hash of veriblock-pop-cpp.
run: |
echo "CURRENT_VERSION=$(< ./depends/packages/veriblock-pop-cpp.mk head -n 2 | tail -n 1 | cut -f2 -d "=")" >> $GITHUB_ENV
echo "CURRENT_SHA256=$(< ./depends/packages/veriblock-pop-cpp.mk head -n 5 | tail -n 1 | cut -f2 -d "=")" >> $GITHUB_ENV
- name: update veriblock-pop-cpp
run: |
sed -i -r "s/${CURRENT_VERSION}$/${{ github.event.client_payload.sha }}/" ./depends/packages/veriblock-pop-cpp.mk
sed -i -r "s/${CURRENT_SHA256}$/${SHA256}/" ./depends/packages/veriblock-pop-cpp.mk
- name: Create PR
if: success()
id: cpr
uses: peter-evans/create-pull-request@v3
with:
base: master
token: ${{ secrets.REPO_TOKEN }}
commit-message: Update veriblock-pop-cpp
title: "Update veriblock-pop-cpp to ${{ github.event.client_payload.sha }}"
reviewers: Warchant,${{ github.event.client_payload.actor }}
assignees: ${{ github.event.client_payload.actor }}
draft: false
branch: veriblock-pop-cpp
labels: |
dependencies
automated
- name: Check outputs
run: |
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"