Skip to content

Check for new pangolin Release #1248

Check for new pangolin Release

Check for new pangolin Release #1248

name: Check for new pangolin Release
on:
schedule:
# At the end of every day
- cron: "0 0 * * *"
jobs:
Create-PR-for-new-Pangolin-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install mamba
uses: conda-incubator/setup-miniconda@v3
with:
mamba-version: "*"
channels: bioconda,conda-forge,defaults
channel-priority: true
- name: Get latest Pangolin release
shell: bash -l {0}
run: |
echo "LATEST_PANGOLIN=$(mamba search -f pangolin -c bioconda | tail -n1 | awk '{print $2}')" >> $GITHUB_ENV
echo "Latest Pangolin release: $(mamba search -f pangolin -c bioconda | tail -n1 | awk '{print $2}')"
- name: Get Pangolin release used in UnCoVar
run: |
echo "CURRENT_PANGOLIN=$(cat workflow/envs/pangolin.yaml | grep pangolin | awk -F "=" '{print $2}')" >> $GITHUB_ENV
echo "Current Pangolin release: $(cat workflow/envs/pangolin.yaml | grep pangolin | awk -F "=" '{print $2}')"
- name: Update Pangolin release used in UnCoVar
if: ${{ env.LATEST_PANGOLIN != env.CURRENT_PANGOLIN }}
run: |
sed -i 's/${{ env.CURRENT_PANGOLIN }}/${{ env.LATEST_PANGOLIN }}/' workflow/envs/pangolin.yaml
- name: Create Pull Request
if: ${{ env.LATEST_PANGOLIN != env.CURRENT_PANGOLIN }}
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
committer: GitHub <[email protected]>
commit-message: Update pangolin to ${{ env.LATEST_PANGOLIN }}
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: pangolin-update-to-${{ env.LATEST_PANGOLIN }}
delete-branch: true
title: "build: update Pangolin to ${{ env.LATEST_PANGOLIN }}"
body: |
Hey there, a new release of Pangolin is available: [${{ env.LATEST_PANGOLIN }}](https://github.com/cov-lineages/pangolin/releases/tag/v${{ env.LATEST_PANGOLIN }})
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
automated pr
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"