Check for new dask-sql version #500
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: matrix.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.DASK_SQL_VER }} | |
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.DASK_SQL_VER }} | |
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 }}`. |