-
Notifications
You must be signed in to change notification settings - Fork 52
64 lines (53 loc) · 2.17 KB
/
update-dask-sql.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Updates stable dask-sql version to use in images.
# Runs once daily.
name: Check for new dask-sql version
on:
schedule:
- cron: "0 0 * * *" # Daily “At 00:00” UTC
workflow_dispatch:
jobs:
update-dask-sql:
runs-on: ubuntu-latest
if: github.repository == 'rapidsai/docker'
steps:
- uses: actions/checkout@v2
- name: Get current dask-sql version
id: current_version
uses: the-coding-turtle/[email protected]
with:
file: settings.yaml
- name: Get new dask-sql version
id: new_version
uses: jacobtomlinson/[email protected]
with:
org: "conda-forge"
package: "dask-sql"
version_system: "SemVer"
- name: Get current/new versions without patch
env:
FULL_VER: ${{ steps.current_version.outputs.STABLE_DASK_SQL_VERSION }}
FULL_NEW_VER: ${{ steps.new_version.outputs.version }}
run: |
echo SHORT_VER=${FULL_VER::-2} >> $GITHUB_ENV
echo SHORT_NEW_VER=${FULL_NEW_VER::-2} >> $GITHUB_ENV
- name: Find and replace full dask-sql version
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ steps.current_version.outputs.STABLE_DASK_SQL_VERSION }}
replace: ${{ steps.new_version.outputs.version }}
- name: Find and replace short dask-sql version
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ env.SHORT_VER }}
replace: ${{ env.SHORT_NEW_VER }}
- name: Create pull request with changes
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update `STABLE_DASK_SQL_VERSION` to `${{ steps.new_version.outputs.version }}`
title: Update `STABLE_DASK_SQL_VERSION` to `${{ steps.new_version.outputs.version }}`
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: "upgrade-dask-sql"
body: |
A new stable dask-sql version has been detected.
Updated all config files and READMEs to use `${{ steps.new_version.outputs.version }}`.