Skip to content

Check for upstream updates #145

Check for upstream updates

Check for upstream updates #145

Workflow file for this run

name: Check for upstream updates
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
name: Check for updates
steps:
- uses: actions/checkout@v2
- name: Check for a new version
run: |
LATEST_VERSION=$(curl -q -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/arkime/arkime/releases/latest | jq -r '.name' | sed 's/v//')
echo $LATEST_VERSION
[[ "$LATEST_VERSION" != "null" ]] || exit 1
sed -i "s/^ENV VERSION=.*$/ENV VERSION=${LATEST_VERSION}/" Dockerfile
echo "LATEST_VERSION=${LATEST_VERSION}" >> "$GITHUB_ENV"
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # 7.0.8
with:
token: ${{ secrets.AUTO_UPDATE_TOKEN }}
branch-token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Bump Arkime version to ${{ env.LATEST_VERSION }}
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
branch: bump-v${{ env.LATEST_VERSION }}
title: Bump Arkime version to ${{ env.LATEST_VERSION }}
assignees: ldruschk
labels: |
automated pr
base: master