Check Shiny Version #196
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
name: Check Shiny Version | |
on: | |
schedule: | |
- cron: '0 4 * * 6' | |
jobs: | |
updateShiny: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Shiny Server Repo | |
uses: actions/checkout@v4 | |
with: | |
repository: rstudio/shiny-server | |
- name: Install libs | |
run: sudo apt-get update && sudo apt-get install curl jq -y | |
- name: Get Newest Shiny Server Tag | |
id: shiny-version-new | |
run: | | |
git fetch --tags | |
tag=$(git describe --tags `git rev-list --tags --max-count=1` | cut -b 2-) | |
echo "release_tag=$tag" >> $GITHUB_OUTPUT | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Latest R Release | |
id: shiny-version-current | |
run: | | |
echo "current_tag=$(<Shiny-version.txt)" >> $GITHUB_OUTPUT | |
- name: Update Shiny Server | |
if: steps.shiny-version-current.outputs.current_tag != steps.shiny-version-new.outputs.release_tag | |
env: | |
RELEASE_TAG: ${{ steps.shiny-version-new.outputs.release_tag }} | |
run: | | |
# Update current release | |
echo ${{ steps.shiny-version-new.outputs.release_tag }} > Shiny-version.txt | |
- name: Update Readme.md & Dockerfile | |
uses: jacobtomlinson/gha-find-replace@master | |
with: | |
find: ${{ steps.shiny-version-current.outputs.current_tag }} | |
replace: ${{ steps.shiny-version-new.outputs.release_tag }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: Update Shiny Server to ${{ steps.shiny-version-new.outputs.release_tag }} | |
title: Update Shiny Server to ${{ steps.shiny-version-new.outputs.release_tag }} | |
body: | | |
Updates [shiny-version][1] to ${{ steps.shiny-version-new.outputs.release_tag }} | |
Auto-generated by [create-pull-request][2] | |
[1]: https://github.com/rstudio/shiny-server | |
[2]: https://github.com/peter-evans/create-pull-request | |
labels: dependencies, automated pr | |
branch: Shiny-updates | |
token: ${{ secrets.REPO_SCOPED_TOKEN }} |